
Proxy transparent option. Nginx open file cache fixed to prevent issues when file is modified.
43 lines
1.2 KiB
Text
43 lines
1.2 KiB
Text
# REVERSE PROXY NGINX CONFIGURATION by Webinoly
|
|
|
|
location / {
|
|
#proxy_set_header Host $host;
|
|
#proxy_set_header X-Forwarded-Host $host;
|
|
#proxy_set_header X-Forwarded-Server $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;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_connect_timeout 300;
|
|
proxy_send_timeout 300;
|
|
proxy_read_timeout 300;
|
|
proxy_ignore_headers Set-Cookie;
|
|
proxy_intercept_errors on;
|
|
|
|
proxy_pass http://localhost:8080;
|
|
|
|
# CacheStaticFiles
|
|
location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|swf|woff2|m4a|cur|heic|tiff|webm|mp3|aac|webp)$ {
|
|
include common/headers-http.conf;
|
|
include common/headers-https.conf;
|
|
add_header "Access-Control-Allow-Origin" "*";
|
|
access_log off;
|
|
log_not_found off;
|
|
expires max;
|
|
|
|
proxy_pass http://localhost:8080;
|
|
}
|
|
|
|
# BasicLocationRootFiles
|
|
location = /robots.txt {
|
|
access_log off;
|
|
log_not_found off;
|
|
|
|
proxy_pass http://localhost:8080;
|
|
}
|
|
# BasicLocEnd
|
|
}
|