Skip to content

Instantly share code, notes, and snippets.

@k0nsl
Last active February 20, 2016 12:57
Show Gist options
  • Select an option

  • Save k0nsl/558ae8789476193cad80 to your computer and use it in GitHub Desktop.

Select an option

Save k0nsl/558ae8789476193cad80 to your computer and use it in GitHub Desktop.
nginx reverse proxy.
server {
listen 209.141.39.33:80;
server_name 60ych.net;
return 301 $scheme://redacted/;
}
server {
listen 209.141.39.33:80;
root /usr/share/nginx/betachat;
index index.html index.htm;
server_name redacted;
access_log /dev/null;
error_log /dev/null crit;
location / {
error_page 500 502 503 504 /custom_50x.html;
location = /custom_50x.html {
root /usr/share/nginx/betachat;
internal;
}
proxy_pass http://ip:port;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forward-Proto http;
proxy_set_header X-Nginx-Proxy true;
proxy_redirect off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment