nginx-conf 793 B

123456789101112131415161718192021222324252627282930313233343536
  1. access_log /dev/stdout main;
  2. error_log /dev/stderr;
  3. server {
  4. listen 80;
  5. server_tokens off;
  6. index index.php index.html index.htm;
  7. root /var/www/html/public;
  8. location / {
  9. try_files $uri /index.php$is_args$args;
  10. }
  11. location ~ ^/index\.php(/|$) {
  12. fastcgi_pass php:9000;
  13. fastcgi_split_path_info ^(.+\.php)(/.*)$;
  14. include fastcgi_params;
  15. fastcgi_send_timeout 600s;
  16. fastcgi_read_timeout 600s;
  17. fastcgi_connect_timeout 600s;
  18. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  19. fastcgi_param DOCUMENT_ROOT $document_root;
  20. internal;
  21. fastcgi_param HTTPS on;
  22. fastcgi_param HTTP_X_FORWARDED_PROTO https;
  23. }
  24. location ~ \.php$ {
  25. return 404;
  26. }
  27. }