Skip to content

Instantly share code, notes, and snippets.

@christopher4lis
Last active July 26, 2023 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christopher4lis/41b96b382ce1d73d584b1e499eb6c14b to your computer and use it in GitHub Desktop.
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
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