nginx.conf 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #user nobody;
  2. worker_processes 4;
  3. events {
  4. worker_connections 1024;
  5. use epoll;
  6. }
  7. http {
  8. default_type application/octet-stream;
  9. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  10. '$status $body_bytes_sent "$http_referer" '
  11. '"$http_user_agent" "$http_x_forwarded_for" "$request_time"';
  12. # error_log /dev/stderr;
  13. # access_log /dev/stdout main;
  14. sendfile on;
  15. #tcp_nopush on;
  16. #keepalive_timeout 0;
  17. keepalive_timeout 15;
  18. include /etc/nginx/mime.types;
  19. #gzip on;
  20. charset UTF-8;
  21. server {
  22. listen 80;
  23. listen [::]:80;
  24. server_name _;
  25. # For https
  26. # listen 443 ssl;
  27. # listen [::]:443 ssl ipv6only=on;
  28. # ssl_certificate /etc/nginx/ssl/default.crt;
  29. # ssl_certificate_key /etc/nginx/ssl/default.key;
  30. root /usr/share/nginx/html;
  31. index index.php index.html index.htm;
  32. location / {
  33. try_files $uri $uri/ /index.php$is_args$args;
  34. }
  35. location ~ \.php$ {
  36. try_files $uri /index.php =404;
  37. fastcgi_pass 127.0.0.1:9000;
  38. fastcgi_index index.php;
  39. fastcgi_buffers 16 16k;
  40. fastcgi_buffer_size 32k;
  41. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  42. #fixes timeouts
  43. fastcgi_read_timeout 600;
  44. include fastcgi_params;
  45. }
  46. location ~ /\.ht {
  47. deny all;
  48. }
  49. location /.well-known/acme-challenge/ {
  50. root /var/www/letsencrypt/;
  51. log_not_found off;
  52. }
  53. error_log /var/log/nginx/laravel_error.log;
  54. access_log /var/log/nginx/laravel_access.log;
  55. }
  56. }