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

  1. map $http_host $python_upstream {
  2. someproject.local.wpstudio.ru http://workspace74:8000;
  3. }
  4. map $http_host $python_root {
  5. someproject.local.wpstudio.ru /usr/share/nginx/python/someproject;
  6. }
  7. server {
  8. listen 80;
  9. server_name
  10. someproject.local.wpstudio.ru
  11. ;
  12. location / {
  13. resolver 127.0.0.11;
  14. proxy_pass $python_upstream;
  15. proxy_set_header Upgrade $http_upgrade;
  16. proxy_set_header Connection 'upgrade';
  17. proxy_set_header Host $host;
  18. }
  19. root $python_root;
  20. location ~ /media {
  21. expires max;
  22. }
  23. location ~ /static {
  24. expires max;
  25. }
  26. }