Skip to content

Instantly share code, notes, and snippets.

@parente
Created February 4, 2011 15:14
Show Gist options
  • Save parente/811210 to your computer and use it in GitHub Desktop.
Save parente/811210 to your computer and use it in GitHub Desktop.
nginx config for aether
server {
listen 80;
server_name aether.raleigh.ibm.com;
server_name_in_redirect off;
access_log /Users/parente/servers/logs/aether_access.log;
location / {
proxy_pass http://localhost:8080;
proxy_pass_header Server;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 80;
server_name ophion.raleigh.ibm.com;
server_name_in_redirect off;
access_log /Users/parente/servers/logs/ophion_access.log;
location / {
proxy_pass http://localhost:9001;
proxy_pass_header Server;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
}
}
daemon off; # disable nginx daemon for superv
worker_processes 5; # number of workers
pid nginx.pid; # pid file in this folder
error_log /Users/parente/servers/logs/nginx_error.log;
events {
worker_connections 1024;
}
http {
include mime.types; # standard types
log_format vhcombined '[$time_local] <$request_time> $remote_addr $host "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
default_type application/octet-stream;
keepalive_timeout 65;
proxy_read_timeout 200;
proxy_next_upstream error; # switch upstream on error only
sendfile on;
tcp_nopush on;
tcp_nodelay on; # disable Nagle for long-lived conn
autoindex on;
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 9;
gzip_http_version 1.1; # 1.0 breaks our proxies for student work
gzip_min_length 0;
gzip_types text/plain text/html text/css image/x-icon image/bmp application/json application/javascript application/x-javascript;
gzip_vary on;
client_max_body_size 10M;
client_body_buffer_size 128k;
# don't use * because we'll end up loading this file again, doh
include apache.conf;
include coweb.conf;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment