Created
January 30, 2012 03:02
-
-
Save moro/1702210 to your computer and use it in GitHub Desktop.
nginx configuration for local development w/ http://foo.dev:10080
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
# vim:set ft=nginx: | |
worker_processes 2; | |
pid /Users/moro/.nginx/nginx.pid; | |
error_log /Users/moro/.nginx/error.log; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /Users/moro/Gentoo/etc/nginx/mime.types; | |
default_type application/octet-stream; | |
include upstreams.conf; | |
server { | |
listen 10080; | |
server_name ~(?<app>.+).dev; | |
access_log off; | |
# access_log /Users/moro/.nginx/app-access.log; | |
error_log /Users/moro/.nginx/app-error.log; | |
location / { | |
proxy_pass http://$app; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
} | |
} |
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
# vim:set ft=nginx: | |
upstream foo { | |
server localhost:5000 max_fails=5 fail_timeout=60; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment