Last active
August 29, 2015 14:04
-
-
Save Dirrk/2fa6d4d173c591bc620d to your computer and use it in GitHub Desktop.
devbuild nginx.conf
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
| worker_processes 1; | |
| daemon off; | |
| 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 logs/access.log main; | |
| sendfile on; | |
| keepalive_timeout 65; | |
| # nodeapps | |
| upstream nodeapp { | |
| server 127.0.0.1:4000; | |
| } | |
| upstream gmtimonitor { | |
| server home.derekrada.com:4000; | |
| } | |
| upstream ghostio { | |
| server 127.0.0.1:2368; | |
| } | |
| upstream control { | |
| server 127.0.0.1:5000; | |
| } | |
| upstream ez { | |
| server 127.0.0.1:9000; | |
| } | |
| upstream slacked { | |
| server slack.derekrada.com:3005; | |
| } | |
| # ghost | |
| server { | |
| listen 80; | |
| server_name derekrada.com www.derekrada.com localhost *.derekrada.com; | |
| access_log logs/ghostio.access.log main; | |
| location / { | |
| proxy_redirect off; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-NginX-Proxy true; | |
| proxy_set_header Connection "upgrade"; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_http_version 1.1; | |
| proxy_pass http://ghostio; | |
| } | |
| location /static { | |
| root /app/nginx/html; | |
| index index.html; | |
| } | |
| error_page 500 502 503 504 /50x.html; | |
| location = /50x.html { | |
| root html; | |
| } | |
| } | |
| # dev.derekrada.com -> testing my apps | |
| server { | |
| listen 80; | |
| server_name dev.derekrada.com; | |
| #access_log logs/host.access.log main; | |
| location / { | |
| proxy_redirect off; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-NginX-Proxy true; | |
| proxy_set_header Connection "upgrade"; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_http_version 1.1; | |
| proxy_pass http://nodeapp; | |
| } | |
| location /static { | |
| root /app/nginx/html; | |
| index index.html; | |
| } | |
| error_page 500 502 503 504 /50x.html; | |
| location = /50x.html { | |
| root html; | |
| } | |
| } | |
| server { | |
| listen 80; | |
| server_name gmti.derekrada.com; | |
| #access_log logs/host.access.log main; | |
| location / { | |
| proxy_redirect off; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-NginX-Proxy true; | |
| proxy_set_header Connection "upgrade"; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_http_version 1.1; | |
| proxy_pass http://gmtimonitor; | |
| } | |
| location /static { | |
| root /app/nginx/html; | |
| index index.html; | |
| } | |
| error_page 500 502 503 504 /50x.html; | |
| location = /50x.html { | |
| root html; | |
| } | |
| } | |
| server { | |
| listen 443; | |
| server_name control.derekrada.com; | |
| access_log logs/control.derekrada.com.access.log main; | |
| ssl on; | |
| ssl_certificate /app/nginx/ssl/control/server.crt; | |
| ssl_certificate_key /app/nginx/ssl/control/server.key; | |
| location / { | |
| proxy_redirect off; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-NginX-Proxy true; | |
| proxy_set_header Connection "upgrade"; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_http_version 1.1; | |
| proxy_pass http://control; | |
| } | |
| location /static { | |
| root /app/nginx/html; | |
| index index.html; | |
| } | |
| error_page 500 502 503 504 /50x.html; | |
| location = /50x.html { | |
| root html; | |
| } | |
| } | |
| server { | |
| listen 80; | |
| server_name ez.derekrada.com; | |
| access_log logs/ez.derekrada.com.access.log main; | |
| ssl off; | |
| location / { | |
| proxy_redirect off; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-NginX-Proxy true; | |
| proxy_http_version 1.1; | |
| proxy_pass http://ez; | |
| } | |
| location /static { | |
| root /app/nginx/html; | |
| index index.html; | |
| } | |
| error_page 500 502 503 504 /50x.html; | |
| location = /50x.html { | |
| root html; | |
| } | |
| } | |
| server { | |
| listen 80; | |
| server_name slack.derekrada.com; | |
| access_log logs/slack.derekrada.com.access.log main; | |
| ssl off; | |
| location / { | |
| proxy_redirect off; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-NginX-Proxy true; | |
| proxy_http_version 1.1; | |
| proxy_pass http://slacked; | |
| } | |
| location /static { | |
| root /app/nginx/html; | |
| index index.html; | |
| } | |
| error_page 500 502 503 504 /50x.html; | |
| location = /50x.html { | |
| root html; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment