From 9da4e621d664a2d470a16fe1fd7869edf41e31cf Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Tue, 18 May 2010 14:10:44 -0400 Subject: Commit nginx/iptables config info --- conf/nginx.conf | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'conf/nginx.conf') diff --git a/conf/nginx.conf b/conf/nginx.conf index bbab6f0..45a98eb 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,7 +1,6 @@ -user www-data; +user dumpfmprod; worker_processes 5; - -error_log /var/log/nginx/error.log; +error_log /home/dumpfmprod/prod/log/nginx/error.log; pid /var/run/nginx.pid; events { @@ -10,9 +9,8 @@ events { } http { - include /etc/nginx/mime.types; - - access_log /var/log/nginx/access.log; + include /etc/nginx/mime.types; + access_log /home/dumpfmprod/prod/log/nginx/error.log; sendfile on; #tcp_nopush on; @@ -27,20 +25,24 @@ http { include /etc/nginx/conf.d/*.conf; server { - listen 80; - - location ^~* ^/(avatars|images)/ { - root /home/ubuntu/dumpfm; - expires 30d; - } - - location ^~* ^/static/ { - root /home/ubuntu/dumpfm; - expires 30m; + listen 80; + server_name .dump.fm; + + location ~* /(avatars|images)/ { + root /home/dumpfmprod/prod; + expires 30d; + } + + location ~* /static/ { + root /home/dumpfmprod/prod; + expires 5m; + } + + location / { + proxy_pass http://127.0.0.1:8080; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + } } - - location / { - proxy_pass http://127.0.0.1:8080; - } - } -} +} \ No newline at end of file -- cgit v1.2.3-70-g09d2