Skip to content

Instantly share code, notes, and snippets.

Last active Dec 31, 2020
What would you like to do?
Compile nginx on Mac OS X 10.9.5
# Run as su
# Kill Apache.
sudo apachectl -k stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
curl -OL
tar -xvzf nginx-1.14.0.tar.gz
# PCRE for doing regex in nginx
curl -OL
tar xvzf pcre-8.41.tar.gz && rm pcre-8.41.tar.gz
# jdomain, for doing internal domain lookups.
curl -OL
curl -OL
tar xvzf openssl-1.1.0g.tar.gz && rm openssl-1.1.0g.tar.gz
cd nginx-1.14.0/
./configure --with-http_v2_module --with-http_auth_request_module --with-http_gzip_static_module --with-pcre=../pcre-8.41/ --add-module=/usr/local/src/ngx_upstream_jdomain-master --with-http_ssl_module --with-openssl=/usr/local/src/openssl-1.1.0g
make && make install
cd /usr/local/nginx/
mkdir sites-available
mkdir sites-enabled
# Edit nginx.conf to add before ending server }
include /usr/local/nginx/conf/sites-enabled/*;
echo 'export PATH="/usr/local/nginx/sbin:$PATH"' >> ~/.profile
<!-- After writing, run `launchctl load -F /System/Library/LaunchDaemons/nginx.plist` //-->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
<plist version="1.0">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment