Created
June 8, 2022 03:35
-
-
Save mgmgpyaesonewin/310b61184dfaf384a80f85b498fba15d to your computer and use it in GitHub Desktop.
Configuring Nginx to Proxy Requests your rest api
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
// Replace the port number with the port you used.The server_name should also be replaced with you domain name. | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name example.com www.example.com ; | |
location / { | |
proxy_pass http://localhost:8080; | |
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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment