Skip to content

Instantly share code, notes, and snippets.

@xamedow
Created June 18, 2018 07:12
Show Gist options
  • Save xamedow/b8b7551371cf811e8c2a02e756ee3304 to your computer and use it in GitHub Desktop.
Save xamedow/b8b7551371cf811e8c2a02e756ee3304 to your computer and use it in GitHub Desktop.
Nginx virtual proxy host
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
send_timeout 1800;
sendfile on;
keepalive_timeout 6500;
server {
listen 80;
listen [::]:80 ipv6only=off;
server_name EXTERNAL SERVER URL
location / {
proxy_pass LOCAL SERVER URL
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 1800;
proxy_connect_timeout 1800;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment