Here are my notes on installing OpenResty locally on OSX. I'm following the instructions over at openresty.org
You need to install OpenResty with LUA support (see below) then follow the rest of the Getting Started tutorial over at openresty.org
It compiles without problem or complaint/ First download the tarball, and cd into the downloads folder, where you should see the configure and makefiles.
Then all you have to do is copy and execute the following commands in the terminal:
./configure --with-cc-opt="-I/usr/local/opt/openssl/include/ -I/usr/local/opt/pcre/include/" --with-ld-opt="-L/usr/local/opt/openssl/lib/ -L/usr/local/opt/pcre/lib/" -j8
Then type:
make make install
These worked without complaint for me on OSX without the need for sudo.
The only issue is with that the default install of nginx with homebrew does not include LUA support.
# Configure and start OpenResty
Then follow the rest of the tutorial over at openresty.org
# Next
Following nginx installation with lua support you get the following helpful advise from homebrew-nginx :
Docroot is: /usr/local/var/www The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that nginx can run without sudo. nginx will load all files in /usr/local/etc/nginx/servers/. ...
So let's do that and follow the tips below:
sudo chown root:wheel /usr/local/Cellar/nginx-full/1.8.1/bin/nginx sudo chmod u+s /usr/local/Cellar/nginx-full/1.8.1/bin/nginx
Reload config:
nginx -s reload
Reopen Logfile:
nginx -s reopen
Stop process:
nginx -s stop Waiting on exit process
nginx -s quit
To have launchd start homebrew/nginx/nginx-full now and restart at login:
brew services start homebrew/nginx/nginx-full ==> Tapping homebrew/services Cloning into '/usr/local/Library/Taps/homebrew/homebrew-services'... remote: Counting objects: 7, done. remote: Compressing objects: 100% (6/6), done. remote: Total 7 (delta 0), reused 6 (delta 0), pack-reused 0 Unpacking objects: 100% (7/7), done. Checking connectivity... done. Tapped 0 formulae (32 files, 46K) ==> Successfully started `nginx-full` (label: homebrew.mxcl.nginx-full)