Skip to content

Instantly share code, notes, and snippets.

@monchier
Created December 4, 2019 18:14
Show Gist options
  • Save monchier/f2e7e7eff4324555cfc07a7359a1a631 to your computer and use it in GitHub Desktop.
Save monchier/f2e7e7eff4324555cfc07a7359a1a631 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;
}
}
}
@Alsen57
Copy link

Alsen57 commented Oct 29, 2021

Hi, i always get the feedback, that the http direct is not allowed here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment