nginx.conf 493 B

12345678910111213141516171819202122
  1. server {
  2. listen 80 default_server;
  3. listen [::]:80 default_server;
  4. server_name localhost;
  5. index index.php index.html;
  6. root /var/www/html/public;
  7. location / {
  8. try_files $uri $uri/ /$is_args$args;
  9. }
  10. location ~ \.php$ {
  11. try_files $uri =404;
  12. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  13. fastcgi_pass php:9000;
  14. fastcgi_index index.php;
  15. include fastcgi_params;
  16. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  17. fastcgi_param PATH_INFO $fastcgi_path_info;
  18. }
  19. }