forked from vixh/nginx-webmin
-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx-default.conf
29 lines (25 loc) · 1020 Bytes
/
nginx-default.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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;
}
}