Last active
October 14, 2015 01:17
-
-
Save bootandy/4284960 to your computer and use it in GitHub Desktop.
#nginx Nginx config for nuclearcarrot
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 characters
| # -------- /etc/nginx/nginx.conf -------- | |
| user www-data; | |
| worker_processes 4; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 768; | |
| # multi_accept on; | |
| } | |
| http { | |
| sendfile on; | |
| tcp_nopush on; | |
| tcp_nodelay on; | |
| keepalive_timeout 65; | |
| types_hash_max_size 2048; | |
| include /etc/nginx/mime.types; | |
| default_type application/octet-stream; | |
| access_log /var/log/nginx/access.log; | |
| error_log /var/log/nginx/error.log; | |
| # Here we reference the below files | |
| include /etc/nginx/sites-enabled/*; | |
| } | |
| # -------- END /etc/nginx/nginx.conf -------- | |
| # The contents of 2 .conf files inside /etc/nginx/sites-enabled/: | |
| # NC config: | |
| server { | |
| listen 80; | |
| server_name nuclearcarrot.com; | |
| server_name_in_redirect off; | |
| root /srv/www/nuclearcarrot.com/nuclearcarrot/; | |
| access_log /srv/www/nuclearcarrot.com/logs/access.log; | |
| error_log /srv/www/nuclearcarrot.com/logs/error.log; | |
| rewrite ^/$ /andyboot.html permanent; | |
| location / { | |
| index andyboot.html index.html; | |
| try_files $uri $uri/ /andyboot.html; | |
| } | |
| # Dont expose hidden files to the web | |
| location ~ /\. { | |
| return 404; | |
| } | |
| } | |
| # HLM config: | |
| server { | |
| listen 80; | |
| server_name hlm.nuclearcarrot.com; | |
| access_log /srv/www/hlm/logs/access.log; | |
| error_log /srv/www/hlm/logs/error.log; | |
| location / { | |
| proxy_pass http://127.0.0.1:8000/; | |
| } | |
| location /static { | |
| root /home/andy/happy-little-messages/; | |
| } | |
| } | |
| # sudo nginx -s reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment