有人玩laradocker么?在laravel中,来一波nginx的配置,如下:

  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. server_name dev.test.cn;
  5. root /var/www/test/public;
  6. index index.php index.html index.htm;
  7. location / {
  8. try_files $uri $uri/ /index.php$is_args$args;
  9. }
  10. location ~ \.php$ {
  11. try_files $uri /index.php =404;
  12. fastcgi_pass php-upstream;
  13. fastcgi_index index.php;
  14. fastcgi_buffers 16 16k;
  15. fastcgi_buffer_size 32k;
  16. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  17. #fixes timeouts
  18. fastcgi_read_timeout 600;
  19. include fastcgi_params;
  20. }
  21. location ~ /\.ht {
  22. deny all;
  23. }
  24. #location /.well-known/acme-challenge/ {
  25. # root /var/www/letsencrypt/;
  26. # log_not_found off;
  27. #}
  28. error_log /var/log/nginx/laravel_error.log;
  29. access_log /var/log/nginx/laravel_access.log;
  30. }