Created
February 28, 2012 16:22
-
-
Save anonymous/1933451 to your computer and use it in GitHub Desktop.
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 { | |
server_name %MySite%.ru www.%MySite%.ru; | |
listen %MyIP%; | |
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ { | |
root /var/www/%MySite%/data/www/%MySite%.ru; | |
access_log /var/www/nginx-logs/%MySite% isp; | |
access_log /var/www/httpd-logs/%MySite%.ru.access.log ; | |
error_page 404 = @fallback; | |
} | |
location / { | |
proxy_pass http://%MyIP%:81; | |
proxy_redirect http://%MyIP%:81/ /; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
location ~* ^/(webstat|awstats|webmail|myadmin|pgadmin)/ { | |
proxy_pass http://%MyIP%:81; | |
proxy_redirect http://%MyIP%:81/ /; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
location @fallback { | |
proxy_pass http://%MyIP%:81; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
include /usr/local/ispmgr/etc/nginx.inc; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment