Skip to content

Instantly share code, notes, and snippets.

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 sabman/367851dd15b30205a523cfbcb81cfcdf to your computer and use it in GitHub Desktop.
Save sabman/367851dd15b30205a523cfbcb81cfcdf to your computer and use it in GitHub Desktop.
worker_processes 1;
events {
worker_connections 1024;
}
http {
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 5000;
server_name localhost;
location /my_prefix {
rewrite /my_prefix/(.*) /$1 break;
proxy_pass http://localhost:8501;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
location /my_prefix2 {
rewrite /my_prefix2/(.*) /$1 break;
proxy_pass http://localhost:8502;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment