Skip to content

Instantly share code, notes, and snippets.

Created August 8, 2012 05:44
Show Gist options
  • Save anonymous/3292503 to your computer and use it in GitHub Desktop.
Save anonymous/3292503 to your computer and use it in GitHub Desktop.
nginx proxy example
server {
listen 80;
server_name http://abc.xxx.com;
charset utf-8;
access_log /var/log/nginx/access.log main;
location / {
proxy_set_header Host 123.yyy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
rewrite ^(.*)$ /example$1 break;
proxy_max_temp_file_size 0;
proxy_pass http://123.yyy.com;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment