nginx.conf 798 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. worker_processes 1;
  2. events {
  3. worker_connections 1024;
  4. }
  5. http {
  6. include mime.types;
  7. default_type application/octet-stream;
  8. sendfile on;
  9. keepalive_timeout 65;
  10. server {
  11. listen 80 default_server;
  12. listen [::]:80 default_server;
  13. root /var/lib/nginx/html;
  14. index index.html index.htm index.php;
  15. server_name _;
  16. location / {
  17. # First attempt to serve request as file, then
  18. # as directory, then fall back to displaying a 404.
  19. try_files $uri $uri/ =404;
  20. }
  21. location ~ \.php$ {
  22. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  23. # With php fpm:
  24. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  25. fastcgi_index index.php;
  26. include fastcgi_params;
  27. include fastcgi.conf;
  28. }
  29. }
  30. }