Created
May 1, 2022 18:57
-
-
Save martwozniak/c9e813936cf35d403cc72cfc033b0d03 to your computer and use it in GitHub Desktop.
nginx reverse proxy without ssl
This file contains 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 { | |
server_name <DOMAIN_NAME> www.<DOMAIN_NAME>; | |
client_max_body_size 100M; | |
autoindex off; | |
location / { | |
# reverse proxy for next server | |
proxy_pass http://localhost:<PORT>; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
# we need to remove this 404 handling | |
# because next's _next folder and own handling | |
# try_files $uri $uri/ =404; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment