default 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # /etc/nginx/sites-enabled/default
  2. ##
  3. # You should look at the following URL's in order to grasp a solid understanding
  4. # of Nginx configuration files in order to fully unleash the power of Nginx.
  5. # https://www.nginx.com/resources/wiki/start/
  6. # https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
  7. # https://wiki.debian.org/Nginx/DirectoryStructure
  8. #
  9. # In most cases, administrators will remove this file from sites-enabled/ and
  10. # leave it as reference inside of sites-available where it will continue to be
  11. # updated by the nginx packaging team.
  12. #
  13. # This file will automatically load configuration files provided by other
  14. # applications, such as Drupal or Wordpress. These applications will be made
  15. # available underneath a path with that package name, such as /drupal8.
  16. #
  17. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  18. ##
  19. # Default server configuration
  20. #
  21. server {
  22. listen 80 default_server;
  23. listen [::]:80 default_server;
  24. # SSL configuration
  25. #
  26. # listen 443 ssl default_server;
  27. # listen [::]:443 ssl default_server;
  28. #
  29. # Note: You should disable gzip for SSL traffic.
  30. # See: https://bugs.debian.org/773332
  31. #
  32. # Read up on ssl_ciphers to ensure a secure configuration.
  33. # See: https://bugs.debian.org/765782
  34. #
  35. # Self signed certs generated by the ssl-cert package
  36. # Don't use them in a production server!
  37. #
  38. # include snippets/snakeoil.conf;
  39. root /var/www/html;
  40. # Add index.php to the list if you are using PHP
  41. index index.html index.php index.nginx-debian.html;
  42. server_name _;
  43. location / {
  44. # First attempt to serve request as file, then
  45. # as directory, then fall back to displaying a 404.
  46. try_files $uri $uri/ =404;
  47. }
  48. # pass PHP scripts to FastCGI server
  49. #
  50. location ~ .*\.php(\/.*)*$ {
  51. include snippets/fastcgi-php.conf;
  52. #
  53. # # With php-fpm (or other unix sockets):
  54. fastcgi_pass unix:/run/php/php7.3-fpm.sock;
  55. # # With php-cgi (or other tcp sockets):
  56. # fastcgi_pass 127.0.0.1:9000;
  57. }
  58. # deny access to .htaccess files, if Apache's document root
  59. # concurs with nginx's one
  60. #
  61. #location ~ /\.ht {
  62. # deny all;
  63. #}
  64. }
  65. # Virtual Host configuration for example.com
  66. #
  67. # You can move that to a different file under sites-available/ and symlink that
  68. # to sites-enabled/ to enable it.
  69. #
  70. #server {
  71. # listen 80;
  72. # listen [::]:80;
  73. #
  74. # server_name example.com;
  75. #
  76. # root /var/www/example.com;
  77. # index index.html;
  78. #
  79. # location / {
  80. # try_files $uri $uri/ =404;
  81. # }
  82. #}