default.conf 1007 B

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