app.conf 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. server {
  2. listen 80;
  3. server_name localhost;
  4. index index.php index.html;
  5. error_log /dev/stdout info;
  6. access_log /dev/stderr;
  7. root /var/www/public;
  8. client_max_body_size 50m;
  9. location ~ \.php$ {
  10. try_files $uri =404;
  11. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  12. fastcgi_pass app:9000;
  13. fastcgi_index index.php;
  14. include fastcgi_params;
  15. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  16. fastcgi_param PATH_INFO $fastcgi_path_info;
  17. }
  18. location / {
  19. root /var/frontend;
  20. index index.php;
  21. try_files $uri $uri/ /index.php?$query_string;
  22. }
  23. location /ws {
  24. proxy_pass http://websocket:9000;
  25. proxy_set_header X-Real-IP $remote_addr;
  26. proxy_set_header Host $host;
  27. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  28. proxy_set_header X-Forwarded-Proto $scheme;
  29. # WebSocket support
  30. proxy_http_version 1.1;
  31. proxy_set_header Upgrade $http_upgrade;
  32. proxy_set_header Connection "upgrade";
  33. proxy_read_timeout 600s;
  34. }
  35. }