Created
August 10, 2024 07:09
-
-
Save ewilan-riviere/894642643f175a5131144bce8b8806e3 to your computer and use it in GitHub Desktop.
NGINX reverse proxy example, v1.27.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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