Advertisement
felixcool

/etc/nginx/my sites-available/default

Jan 3rd, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.05 KB | None | 0 0
  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. # http://wiki.nginx.org/Pitfalls
  5. # http://wiki.nginx.org/QuickStart
  6. # http://wiki.nginx.org/Configuration
  7. #
  8. # Generally, you will want to move this file somewhere, and start with a clean
  9. # file but keep this around for reference. Or just disable in sites-enabled.
  10. #
  11. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  12. ##
  13.  
  14. # Default server configuration
  15. #
  16. server {
  17. listen 80 default_server;
  18. listen [::]:80 default_server;
  19.  
  20. # SSL configuration
  21. #
  22. # listen 443 ssl default_server;
  23. # listen [::]:443 ssl default_server;
  24. #
  25. # Self signed certs generated by the ssl-cert package
  26. # Don't use them in a production server!
  27. # include snippets/snakeoil.conf;
  28. #
  29. # ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # don’t use SSLv3 ref: POODLE
  30. # ssl_ciphers HIGH:!aNULL:!MD5;
  31. # ssl_prefer_server_ciphers on;
  32.  
  33. root /var/www/html;
  34.  
  35. # Add index.php to the list if you are using PHP
  36. index index.html index.htm index.nginx-debian.html;
  37.  
  38. server_name _;
  39. #
  40. # listen 443 ssl default_server;
  41. # listen [::]:443 ssl default_server;
  42. #
  43. # Self signed certs generated by the ssl-cert package
  44. # Don't use them in a production server!
  45. # include snippets/snakeoil.conf;
  46. #
  47. # ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # don’t use SSLv3 ref: POODLE
  48. # ssl_ciphers HIGH:!aNULL:!MD5;
  49. # ssl_prefer_server_ciphers on;
  50.  
  51. root /var/www/html;
  52.  
  53. # Add index.php to the list if you are using PHP
  54. index index.html index.htm index.nginx-debian.html;
  55.  
  56. server_name _;
  57.  
  58. location / {
  59. # First attempt to serve request as file, then
  60. # as directory, then fall back to displaying a 404.
  61. try_files $uri $uri/ =404;
  62. }
  63.  
  64. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  65. #
  66. #location ~ \.php$ {
  67. # include snippets/fastcgi-php.conf;
  68. #
  69. # # With php5-cgi alone:
  70. # fastcgi_pass 127.0.0.1:9000;
  71. # # With php5-fpm:
  72. # fastcgi_pass unix:/var/run/php5-fpm.sock;
  73. #}
  74.  
  75. # deny access to .htaccess files, if Apache's document root
  76. # concurs with nginx's one
  77. #
  78.  
  79. # First attempt to serve request as file, then
  80. # as directory, then fall back to displaying a 404.
  81. try_files $uri $uri/ =404;
  82. }
  83.  
  84. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  85. #
  86. #location ~ \.php$ {
  87. # include snippets/fastcgi-php.conf;
  88. #
  89. # # With php5-cgi alone:
  90. # fastcgi_pass 127.0.0.1:9000;
  91. # # With php5-fpm:
  92. # fastcgi_pass unix:/var/run/php5-fpm.sock;
  93. #}
  94.  
  95. # deny access to .htaccess files, if Apache's document root
  96. # concurs with nginx's one
  97. #
  98. #location ~ /\.ht {
  99. # deny all;
  100. #}
  101. }
  102.  
  103.  
  104. # Virtual Host configuration for example.com
  105. #
  106. # You can move that to a different file under sites-available/ and symlink that
  107. # to sites-enabled/ to enable it.
  108. #
  109. #server {
  110. # listen 80;
  111. # listen [::]:80;
  112. #
  113. # server_name example.com;
  114. #
  115. # root /var/www/example.com;
  116. # index index.html;
  117. #
  118.  
  119. # deny all;
  120. #}
  121. }
  122.  
  123.  
  124. # Virtual Host configuration for example.com
  125. #
  126. # You can move that to a different file under sites-available/ and symlink that
  127. # to sites-enabled/ to enable it.
  128. #
  129. #server {
  130. # listen 80;
  131. # listen [::]:80;
  132. #
  133. # server_name example.com;
  134. #
  135. # root /var/www/example.com;
  136. # index index.html;
  137. #
  138. # location / {
  139. # try_files $uri $uri/ =404;
  140. # }
  141. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement