Created
September 28, 2012 10:13
-
-
Save laozhu/3799003 to your computer and use it in GitHub Desktop.
42qu Reverse Proxy
This file contains 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
server { | |
listen 80; | |
server_name supyer.com.42qu.com *.supyer.com.42qu.com; | |
client_max_body_size 512M; | |
location / { | |
expires -1; | |
set $realhost supyer.com; | |
if ($host ~ "(.*.supyer.com).42qu.com") { | |
set $realhost $1; | |
} | |
proxy_set_header Host $realhost; | |
proxy_pass http://supyer.com.42qu.com; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
access_log /var/log/nginx/main.access_log info; | |
error_log /var/log/nginx/main.error_log info; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment