phpinfo.conf 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. ##
  2. # You should look at the following URL's in order to grasp a solid understanding
  3. # of Nginx configuration files in order to fully unleash the power of Nginx.
  4. # https://www.nginx.com/resources/wiki/start/
  5. # https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
  6. # https://wiki.debian.org/Nginx/DirectoryStructure
  7. #
  8. # In most cases, administrators will remove this file from sites-enabled/ and
  9. # leave it as reference inside of sites-available where it will continue to be
  10. # updated by the nginx packaging team.
  11. #
  12. # This file will automatically load configuration files provided by other
  13. # applications, such as Drupal or Wordpress. These applications will be made
  14. # available underneath a path with that package name, such as /drupal8.
  15. #
  16. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  17. ##
  18. server {
  19. listen 80;
  20. listen [::]:80;
  21. root /var/www/html;
  22. # Add index.php to the list if you are using PHP
  23. index index.html index.htm index.php;
  24. server_name localhost;
  25. location / {
  26. # First attempt to serve request as file, then
  27. # as directory, then fall back to displaying a 404.
  28. try_files $uri $uri/ =404;
  29. }
  30. # pass PHP scripts to FastCGI server
  31. #
  32. location ~ \.php$ {
  33. include snippets/fastcgi-php.conf;
  34. #
  35. # With php-fpm (or other unix sockets):
  36. fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  37. # # With php-cgi (or other tcp sockets):
  38. # fastcgi_pass 127.0.0.1:9000;
  39. }
  40. # deny access to .htaccess files, if Apache's document root
  41. # concurs with nginx's one
  42. #
  43. #location ~ /\.ht {
  44. # deny all;
  45. #}
  46. }