Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (25 sloc) 1020 Bytes
server {
listen ${IP}:${PORT};
server_name ${DOM} www.${DOM};
access_log ${HOME}/logs/nginx_access.log;
error_log ${HOME}/logs/nginx_error.log;
index index.php index.html index.htm;
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|txt|swfzip|tgz|gz|rar|bz2|doc|xls|pdf)$ {
root ${PUBLIC_HTML_PATH};
try_files $uri $uri/ @fallback;
}
location / {
proxy_pass http://${PROXY_IP}:${PROXY_PORT};
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;
}
location @fallback {
proxy_pass http://${PROXY_IP}:${PROXY_PORT};
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;
}
}