Advertisement
Lilike

Untitled

Jan 22nd, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.52 KB | None | 0 0
  1. # You should look at the following URL's in order to grasp a solid understanding
  2. # of Nginx configuration files in order to fully unleash the power of Nginx.
  3. # https://www.nginx.com/resources/wiki/start/
  4. # https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
  5. # https://wiki.debian.org/Nginx/DirectoryStructure
  6. #
  7. # In most cases, administrators will remove this file from sites-enabled/ and
  8. # leave it as reference inside of sites-available where it will continue to be
  9. # updated by the nginx packaging team.
  10. #
  11. # This file will automatically load configuration files provided by other
  12. # applications, such as Drupal or Wordpress. These applications will be made
  13. # available underneath a path with that package name, such as /drupal8.
  14. #
  15. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  16. ##
  17.  
  18. # Default server configuration
  19. #
  20. server {
  21. listen 80 default_server;
  22. listen [::]:80 default_server;
  23.  
  24. # SSL configuration
  25. #
  26. # listen 443 ssl default_server;
  27. # listen [::]:443 ssl default_server;
  28. # SSL configuration
  29. #
  30. # listen 443 ssl default_server;
  31. # listen [::]:443 ssl default_server;
  32. #
  33. # Note: You should disable gzip for SSL traffic.
  34. # See: https://bugs.debian.org/773332
  35. #
  36. # Read up on ssl_ciphers to ensure a secure configuration.
  37. # See: https://bugs.debian.org/765782
  38. #
  39. # Self signed certs generated by the ssl-cert package
  40. # Don't use them in a production server!
  41. #
  42. # include snippets/snakeoil.conf;
  43.  
  44. # root /var/www/html;
  45. root /data/www;
  46. # root /home/ti/Pictures;
  47. # Add index.php to the list if you are using PHP
  48. index index.html index.htm index.nginx-debian.html index.php;
  49.  
  50. server_name _;
  51. server_name webserver.ddns.net;
  52.  
  53. location / {
  54. }
  55.  
  56. location ~^/images/(.*)$ {
  57. alias /data/www/images/$1;
  58. }
  59. # location ~ ^/users/(.+\.(?:gif|jpe?g|png))$ {
  60. # alias /data/www/images/$1;
  61. location /images/ {
  62. # alias /data/www;
  63. # }
  64. # location / {
  65. # }
  66.  
  67. # location /images {
  68. # autoindex on;
  69. # autoindex_exact_size off;
  70. }
  71. # location / {
  72. # First attempt to serve request as file, then
  73. # as directory, then fall back to displaying a 404.
  74. }
  75.  
  76. # location / {
  77. # root /data/www;
  78. # }
  79.  
  80. # location /images {
  81. # root /data;
  82. # }
  83.  
  84.  
  85. # pass PHP scripts to FastCGI server
  86. #
  87. #location ~ \.php$ {
  88. # include snippets/fastcgi-php.conf;
  89. #
  90. # # With php-fpm (or other unix sockets):
  91. # fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  92. # # With php-cgi (or other tcp sockets):
  93. # fastcgi_pass 127.0.0.1:9000;
  94. #}
  95.  
  96. # deny access to .htaccess files, if Apache's document root
  97. # concurs with nginx's one
  98. #
  99. #location ~ /\.ht {
  100. # deny all;
  101. #}
  102. #}
  103. # Virtual Host configuration for example.com
  104. #
  105. # You can move that to a different file under sites-available/ and symlink that
  106. # to sites-enabled/ to enable it.
  107. #
  108. #server {
  109. # listen 80;
  110. # listen [::]:80;
  111. #
  112. # server_name example.com;
  113. #
  114. # root /var/www/example.com;
  115. # index index.html;
  116. # location / {
  117. # try_files $uri $uri/ =404;
  118. # }
  119. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement