Last active
July 26, 2023 23:02
-
-
Save christopher4lis/41b96b382ce1d73d584b1e499eb6c14b to your computer and use it in GitHub Desktop.
Reverse proxy configuration to re-route requests from port 80 to port 3000
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 { | |
listen 80; | |
server_name <Your_Domain_Name>; | |
location / { | |
proxy_pass http://localhost:3000; | |
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; | |
} | |
} | |
// Enable the site by creating a symbolic link to it in the sites-enabled directory: | |
// sudo ln -s /etc/nginx/sites-available/multiplayer.chriscourses.games /etc/nginx/sites-enabled | |
// Test your Nginx configurations to ensure there's no syntax error: | |
// sudo nginx -t | |
// If the test is successful, reload Nginx to apply the changes: | |
// sudo systemctl reload nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment