Skip to content

Instantly share code, notes, and snippets.

@rafirh
Created July 17, 2023 08:34
Show Gist options
  • Save rafirh/92dc6ec2f2c3cf607874c1cbd75c6c59 to your computer and use it in GitHub Desktop.
Save rafirh/92dc6ec2f2c3cf607874c1cbd75c6c59 to your computer and use it in GitHub Desktop.
NGINx Conf Example
server {
server_name <app-domain>;
access_log /var/log/nginx/<app-name>.access.log;
error_log /var/log/nginx/<app-name>.error.log;
location / {
include proxy_params;
proxy_pass http://0.0.0.0:<app-port>;
proxy_set_header Host $host;
proxy_set_header X-Forwared-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment