-
-
Save kmassada/1ad1b0e1742139b8f3d5 to your computer and use it in GitHub Desktop.
Revisions
-
kmassada revised this gist
Nov 12, 2015 . 2 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes. -
kmassada revised this gist
Nov 7, 2015 . No changes.There are no files selected for viewing
-
kmassada revised this gist
Nov 7, 2015 . 1 changed file with 16 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,16 +6,29 @@ File locations: * `default` and `default-ssl` to `/usr/local/etc/nginx/sites-available` ``` #STOP APACHE sudo apachectl stop #REPLACE PORTS sudo sed -i 's/8080/80g' /usr/local/etc/nginx/nginx.conf mkdir -p /usr/local/etc/nginx/sites-available wget https://gist.github.com/kmassada/1ad1b0e1742139b8f3d5/raw/47763109f40a44a1baf43926c709bff83e9cee94/default -O /usr/local/etc/nginx/sites-available/default wget https://gist.github.com/kmassada/1ad1b0e1742139b8f3d5/raw/47763109f40a44a1baf43926c709bff83e9cee94/default-ssl -O /usr/local/etc/nginx/sites-available/default-ssl sudo nginx #SETUP PROJECTS mkdir ~/Sites sudo mkdir -p /var/ && sudo ln -s ~/Sites /var/www SITE="test.com" mkdir -p ~/Sites/$SITE echo '<html><body><h2>'${SITE}'</h2></body></html>' >> ~/Sites/$SITE/index.html yes|cp -f /usr/local/etc/nginx/sites-available/default /usr/local/etc/nginx/servers/$SITE sed -i "s/localhost/$SITE.build/g" /usr/local/etc/nginx/servers/$SITE sed -i "s/root_path/\/var\/www\/$SITE/g" /usr/local/etc/nginx/servers/$SITE sudo nginx -s reload ``` -
kmassada revised this gist
Nov 7, 2015 . 3 changed files with 18 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,21 @@ mkdir -p /usr/local/etc/nginx/sites-available File locations: * `nginx.conf` to `/usr/local/etc/nginx/` * `default` and `default-ssl` to `/usr/local/etc/nginx/sites-available` ``` #REPLACE PORTS sudo sed -i 's/8080/80g' /usr/local/etc/nginx/nginx.conf mkdir -p /usr/local/etc/nginx/sites-available wget https://gist.github.com/kmassada/1ad1b0e1742139b8f3d5/raw/8f6edee0b3c488a057cdf084906f825810a19b57/default -O /usr/local/etc/nginx/sites-available/default wget https://gist.github.com/kmassada/1ad1b0e1742139b8f3d5/raw/8f6edee0b3c488a057cdf084906f825810a19b57/default-ssl -O /usr/local/etc/nginx/sites-available/default-ssl sudo -s nginx #SETUP PROJECTS mkdir ~/Sites sudo mkdir -p /var/ && sudo ln -s ~/Sites /var/www ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ server { #access_log logs/host.access.log main; location / { root root_path; index index.html index.htm; } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ server { ssl_prefer_server_ciphers on; location / { root root_path; index index.html index.htm; } } -
kmassada revised this gist
Nov 7, 2015 . 2 changed files with 0 additions and 52 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,20 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,32 +0,0 @@ -
jimothyGator revised this gist
Apr 22, 2013 . No changes.There are no files selected for viewing
-
jimothyGator revised this gist
Apr 22, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,8 +3,8 @@ server { server_name localhost; ssl on; ssl_certificate server.crt; ssl_certificate_key server.key; ssl_session_timeout 5m; -
jimothyGator revised this gist
Apr 22, 2013 . 2 changed files with 25 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ mkdir -p /usr/local/etc/nginx/sites-{enabled,available} File locations: * `nginx.conf` to `/usr/local/etc/nginx/` * `default` and `default-ssl` to `/usr/local/etc/nginx/sites-available` * `homebrew.mxcl.nginx.plist` to `/Library/LaunchDaemons/` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>homebrew.mxcl.nginx</string> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <false/> <key>ProgramArguments</key> <array> <string>/usr/local/opt/nginx/sbin/nginx</string> <string>-g</string> <string>daemon off;</string> </array> <key>WorkingDirectory</key> <string>/usr/local</string> </dict> </plist> -
jimothyGator revised this gist
Apr 22, 2013 . 2 changed files with 34 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,20 @@ server { listen 80; server_name localhost; #access_log logs/host.access.log main; location / { root html; index index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ server { listen 443; server_name localhost; ssl on; ssl_certificate cert.pem; ssl_certificate_key cert.key; ssl_session_timeout 5m; ssl_protocols SSLv2 SSLv3 TLSv1; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; location / { root html; index index.html index.htm; } } -
jimothyGator revised this gist
Apr 22, 2013 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ mkdir -p /usr/local/etc/nginx/sites-{enabled,available} Save `nginx.conf` to `/usr/local/etc/nginx/nginx.conf`, and `default` and `default-ssl` to `/usr/local/etc/nginx/sites-available`. -
jimothyGator revised this gist
Apr 22, 2013 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ server { listen 80 default_server; server_name _; location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_pass http://127.0.0.1:8000; } } -
jimothyGator created this gist
Apr 22, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ #user nobody; worker_processes 1; error_log /Library/Logs/nginx/error.log; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /Library/Logs/nginx/access.log main; sendfile on; keepalive_timeout 65; index index.html index.php; upstream www-upstream-pool{ server unix:/tmp/php-fpm.sock; } include /etc/nginx/conf.d/*.conf; include /usr/local/etc/nginx/sites-enabled/*; }