Skip to content

Instantly share code, notes, and snippets.

@ewilan-riviere
Created August 10, 2024 07:09
Show Gist options
  • Select an option

  • Save ewilan-riviere/894642643f175a5131144bce8b8806e3 to your computer and use it in GitHub Desktop.

Select an option

Save ewilan-riviere/894642643f175a5131144bce8b8806e3 to your computer and use it in GitHub Desktop.
NGINX reverse proxy example, v1.27.0
server {
listen 80;
listen [::]:80;
http2 on;
server_name domain.com; # change to your domain
# uncomment if you want to hide server for crawlers
# add_header X-Frame-Options "SAMEORIGIN";
# add_header X-Content-Type-Options "nosniff";
# add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
# add_header X-XSS-Protection "1; mode=block";
charset utf-8;
# client_max_body_size 10M; # change to your needs
access_log /var/log/nginx/domain.com.access.log; # change to your domain
error_log /var/log/nginx/domain.com.error.log; # change to your domain
location / {
proxy_pass http://127.0.0.1:PORT; # PORT is the port number of the application
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment