2024-11-25 09:18:19 +03:00
|
|
|
map $http_host $python_upstream {
|
2025-04-08 17:13:21 +03:00
|
|
|
someproject.local.wpstudio.ru http://python-someproject:8000;
|
2024-11-25 09:18:19 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|