Skip to content

Instantly share code, notes, and snippets.

@stephenl03
Created February 23, 2018 02:44
Show Gist options
  • Save stephenl03/3ba2215e78b6f046485929444ac6469a to your computer and use it in GitHub Desktop.
Save stephenl03/3ba2215e78b6f046485929444ac6469a to your computer and use it in GitHub Desktop.
nginx reverse proxy to znc
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