Created
August 16, 2012 16:56
-
-
Save chrisgeo/3371654 to your computer and use it in GitHub Desktop.
nginx config
This file contains 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
server { | |
listen 80 default; | |
server_name www.localhost.com localhost.com *.localhost.com; | |
server_name_in_redirect off; | |
port_in_redirect off; | |
access_log /var/log/nginx/nginx.access.log; | |
location ~* ^/$ { | |
proxy_set_header CIP-NETSCALER $remote_addr; | |
proxy_set_header X-True-Origin $remote_addr; | |
proxy_set_header Host $host; | |
proxy_pass http://anon; | |
} | |
location ~* ^/.*$ { | |
proxy_set_header CIP-NETSCALER $remote_addr; | |
proxy_set_header X-True-Origin $remote_addr; | |
proxy_set_header Host $host; | |
proxy_pass http://dotnetweb; | |
} | |
} | |
# HTTPS server | |
server { | |
listen 443 default; | |
server_name www.localhost.com localhost.com *.localhost.com; | |
server_name_in_redirect off; | |
port_in_redirect off; | |
access_log /var/log/nginx/nginx.access.log; | |
ssl on; | |
ssl_certificate /etc/ssl/certs/server.crt; | |
ssl_certificate_key /etc/ssl/private/server.key; | |
ssl_session_timeout 5m; | |
ssl_protocols SSLv3 TLSv1; | |
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; | |
ssl_prefer_server_ciphers on; | |
location ~* ^/$ { | |
proxy_set_header Front-End-HTTPS on; | |
proxy_set_header CIP-NETSCALER $remote_addr; | |
proxy_set_header X-True-Origin $remote_addr; | |
proxy_set_header Host $host; | |
proxy_pass http://anon; | |
} | |
location ~* ^/.*$ { | |
proxy_set_header Front-End-HTTPS on; | |
proxy_set_header CIP-NETSCALER $remote_addr; | |
proxy_set_header X-True-Origin $remote_addr; | |
proxy_set_header Host $host; | |
proxy_pass http://dotnetweb; | |
} | |
} |
This file contains 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
user www-data; | |
worker_processes 4; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { | |
## | |
# Basic Settings | |
## | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 65; | |
types_hash_max_size 2048; | |
# server_tokens off; | |
# server_names_hash_bucket_size 64; | |
# server_name_in_redirect off; | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
## | |
# Logging Settings | |
## | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
## | |
# Gzip Settings | |
## | |
gzip on; | |
gzip_disable "msie6"; | |
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
# gzip_vary on; | |
# gzip_proxied any; | |
# gzip_comp_level 6; | |
# gzip_buffers 16 8k; | |
# gzip_http_version 1.1; | |
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
## | |
# Virtual Host Configs | |
## | |
include /etc/nginx/conf.d/*.conf; | |
include /etc/nginx/sites-enabled/*; | |
upstream admintools { | |
server 127.0.0.1:8700; | |
} | |
upstream supervisor_status { | |
server 127.0.0.1:9001; | |
} | |
upstream panel_svc { | |
server 127.0.0.1:9800; | |
} | |
upstream anon { | |
server 127.0.0.1:8300; | |
} | |
upstream ta_proxy { | |
server 127.0.0.1:8600; | |
} | |
upstream lingo3g_proxy { | |
server 127.0.0.1:9100; | |
} | |
upstream dotnetweb { | |
server 127.0.0.1:9000; | |
} | |
upstream billweb { | |
server 127.0.0.1:8100; | |
} | |
upstream create { | |
server 127.0.0.1:8400; | |
} | |
upstream resources { | |
server 127.0.0.1:5000; | |
} | |
upstream analyzeweb { | |
server 127.0.0.1:6543; | |
} | |
upstream billsvc { | |
server 127.0.0.1:4433; | |
server 127.0.0.1:4434; | |
server 127.0.0.1:4435; | |
server 127.0.0.1:4436; | |
} | |
server { | |
listen 4430; | |
server_name_in_redirect off; | |
port_in_redirect off; | |
access_log /var/log/nginx/billsvc.access.log; | |
location / { | |
proxy_pass http://billsvc; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment