user www; worker_processes 8; error_log /var/log/nginx-error.log debug; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; sendfile on; #tcp_nopush on; keepalive_timeout 65; tcp_nodelay on; gzip on; gzip_min_length 1100; gzip_buffers 4 8k; gzip_types text/plain; upstream mongrel_cluster { server 127.0.0.1:3000; server 127.0.0.1:3001; server 127.0.0.1:3002; server 127.0.0.1:3003; } upstream apache { server 127.0.0.1:10005; } server { listen 80; server_name www.bsdguy.net bsdguy.net ; #root /var/www/www.bsdguy.net/htdocs; access_log /var/www/www.bsdguy.net/log/access.log; index index.html index.htm index.php; location / { autoindex on; # indexa el directorio sino encuentra un index valido #index index.html; root /var/www/www.bsdguy.net/htdocs; } } #------------------------------------------------- # typo - blog.bsdguy.net #------------------------------------------------ server { listen 80; server_name blog.bsdguy.net; root /var/www/blog/typo/public; access_log /var/www/blog/typo/log/access.log; fastcgi_temp_path /var/www/blog/typo/tmp/fcgi_temp; client_body_temp_path /var/www/blog/typo/tmp/client_body 1 2; proxy_temp_path /var/www/blog/typo/tmp/proxy_temp; index index.html index.htm; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect false; if (-f $request_filename/index.html) { rewrite (.*) $1/index.html break; } if (-f $request_filename.html) { rewrite (.*) $1.html break; } if (!-f $request_filename) { proxy_pass http://mongrel_cluster; break; } } error_page 500 502 503 504 /50x.html; location = /500.html { root /var/www/blog/typo/public ; } } # end blog.bsdguy.net server { listen 80; server_name typodev.bsdguy.net; root /var/www/blog/typo/public; access_log /var/www/blog.bsdguy.net/typo-4.1.1/log/access.log; fastcgi_temp_path /var/www/blog.bsdguy.net/typo-4.1.1/tmp/fcgi_temp; client_body_temp_path /var/www/blog.bsdguy.net/typo-4.1.1/tmp/client_body 1 2; proxy_temp_path /var/www/blog.bsdguy.net/typo-4.1.1/tmp/proxy_temp; index index.html index.htm; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect false; if (-f $request_filename/index.html) { rewrite (.*) $1/index.html break; } if (-f $request_filename.html) { rewrite (.*) $1.html break; } if (!-f $request_filename) { proxy_pass http://mongrel_cluster; break; } } error_page 500 502 503 504 /50x.html; location = /500.html { root /var/www/blog.bsdguy.net/htdocs ; } } # end blog.bsdguy.net - typo 4.1.1 } # end http