octane.conf.example 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. map $http_upgrade $connection_upgrade {
  2. default upgrade;
  3. '' close;
  4. }
  5. upstream octane {
  6. server workspace:8000 weight=5 max_fails=3 fail_timeout=30s;
  7. keepalive 16;
  8. }
  9. server {
  10. listen 80;
  11. listen [::]:80;
  12. server_name octane.test;
  13. server_tokens off;
  14. root /var/www/octane/public;
  15. index index.php;
  16. charset utf-8;
  17. location /index.php {
  18. try_files /not_exists @octane;
  19. }
  20. location / {
  21. try_files $uri $uri/ @octane;
  22. }
  23. location = /favicon.ico { access_log off; log_not_found off; }
  24. location = /robots.txt { access_log off; log_not_found off; }
  25. error_page 404 /index.php;
  26. location @octane {
  27. set $suffix "";
  28. if ($uri = /index.php) {
  29. set $suffix ?$query_string;
  30. }
  31. proxy_http_version 1.1;
  32. proxy_set_header Host $http_host;
  33. proxy_set_header Scheme $scheme;
  34. proxy_set_header SERVER_PORT $server_port;
  35. proxy_set_header REMOTE_ADDR $remote_addr;
  36. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  37. proxy_set_header Upgrade $http_upgrade;
  38. proxy_set_header Connection $connection_upgrade;
  39. proxy_pass http://octane$suffix;
  40. }
  41. error_log /var/log/nginx/octane_error.log;
  42. access_log /var/log/nginx/octane_access.log;
  43. }