You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
637 B
32 lines
637 B
map $http_host $python_upstream {
|
|
someproject.local.wpstudio.ru http://workspace74:8000;
|
|
}
|
|
|
|
map $http_host $python_root {
|
|
someproject.local.wpstudio.ru /usr/share/nginx/python/someproject;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name
|
|
someproject.local.wpstudio.ru
|
|
;
|
|
|
|
location / {
|
|
resolver 127.0.0.11;
|
|
proxy_pass $python_upstream;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection 'upgrade';
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
root $python_root;
|
|
|
|
location ~ /media {
|
|
expires max;
|
|
}
|
|
|
|
location ~ /static {
|
|
expires max;
|
|
}
|
|
}
|