app.conf 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 /files/ {
  19. rewrite ^/files/(.*)$ /$1 break;
  20. proxy_set_header X-Real-IP $remote_addr;
  21. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  22. proxy_set_header X-Forwarded-Proto $scheme;
  23. proxy_set_header Host $http_host;
  24. proxy_connect_timeout 300;
  25. # Default is HTTP/1, keepalive is only enabled in HTTP/1.1
  26. proxy_http_version 1.1;
  27. proxy_set_header Connection "";
  28. chunked_transfer_encoding off;
  29. proxy_pass http://minio:9000;
  30. }
  31. location / {
  32. root /var/frontend/dist;
  33. index index.html;
  34. try_files $uri $uri/ /index.html;
  35. }
  36. location /api {
  37. try_files $uri $uri/ /index.php?$query_string;
  38. gzip_static on;
  39. }
  40. }