Created
December 17, 2009 21:17
-
-
Save jefftriplett/259036 to your computer and use it in GitHub Desktop.
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
# a work in progress and not very clean but this has passed from one laptop to | |
# another and to my imac. It lazily runs nginx as a reverse proxy from 80 > 8000 | |
#user nobody; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log; | |
#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; | |
#include /opt/local/etc/nginx/mime.types; | |
include /usr/local/Cellar/nginx/0.7.62/conf/mime.types; | |
default_type application/octet-stream; | |
#access_log /var/log/nginx/access.log main; | |
sendfile on; | |
#tcp_nopush on; | |
#keepalive_timeout 0; | |
keepalive_timeout 65; | |
#gzip on; | |
server { | |
listen 80; | |
#server_name some-server.com www.server-name.com; | |
server_name localhost; | |
#access_log logs/host.access.log main; | |
error_page 404 /error/404_error.html; | |
error_page 502 503 504 /error/50x_error.html; | |
# Main location | |
location / { | |
proxy_pass http://127.0.0.1:8000/; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
client_max_body_size 10m; | |
client_body_buffer_size 128k; | |
proxy_connect_timeout 90; | |
proxy_send_timeout 90; | |
proxy_read_timeout 90; | |
proxy_buffer_size 4k; | |
proxy_buffers 4 32k; | |
proxy_busy_buffers_size 64k; | |
proxy_temp_file_write_size 64k; | |
} | |
# Static files location | |
#location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ { | |
# root /spool/www/members_ng; | |
#} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment