laravel.conf.example 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #server {
  2. # listen 80;
  3. # server_name laravel.com.co;
  4. # return 301 https://laravel.com.co$request_uri;
  5. #}
  6. server {
  7. listen 80;
  8. listen [::]:80;
  9. # For https
  10. # listen 443 ssl;
  11. # listen [::]:443 ssl ipv6only=on;
  12. # ssl_certificate /etc/nginx/ssl/default.crt;
  13. # ssl_certificate_key /etc/nginx/ssl/default.key;
  14. server_name laravel.test;
  15. root /var/www/laravel/public;
  16. index index.php index.html index.htm;
  17. location / {
  18. try_files $uri $uri/ /index.php$is_args$args;
  19. }
  20. location ~ \.php$ {
  21. try_files $uri /index.php =404;
  22. fastcgi_pass php-upstream;
  23. fastcgi_index index.php;
  24. fastcgi_buffers 16 16k;
  25. fastcgi_buffer_size 32k;
  26. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  27. #fixes timeouts
  28. fastcgi_read_timeout 600;
  29. include fastcgi_params;
  30. }
  31. location ~ /\.ht {
  32. deny all;
  33. }
  34. location /.well-known/acme-challenge/ {
  35. root /var/www/letsencrypt/;
  36. log_not_found off;
  37. }
  38. error_log /var/log/nginx/laravel_error.log;
  39. access_log /var/log/nginx/laravel_access.log;
  40. }