Created
February 23, 2018 02:44
-
-
Save stephenl03/3ba2215e78b6f046485929444ac6469a to your computer and use it in GitHub Desktop.
nginx reverse proxy to znc
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 443 ssl; | |
location /znc/ { | |
proxy_set_header Host $http_host; | |
proxy_set_header X-NginX-Proxy true; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass_header Set-Cookie; | |
proxy_pass http://127.0.0.1:6664; | |
location ~* \.(?:jpg|jpeg|png|gif|ico|css|js|ttf)$ { | |
expires 1y; | |
add_header Cache-Control public; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass http://127.0.0.1:6664; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment