Advertisement
Guest User

Untitled

a guest
Aug 30th, 2015
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. # }
  2. # statements for each of your virtual hosts to this file
  3.  
  4. ##
  5. # You should look at the following URL's in order to grasp a solid understanding
  6. # of Nginx configuration files in order to fully unleash the power of Nginx.
  7. # http://wiki.nginx.org/Pitfalls
  8. # http://wiki.nginx.org/QuickStart
  9. # http://wiki.nginx.org/Configuration
  10. #
  11. # Generally, you will want to move this file somewhere, and start with a clean
  12. # file but keep this around for reference. Or just disable in sites-enabled.
  13. #
  14. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  15. ##
  16.  
  17. server {
  18. listen 80 default_server;
  19. listen [::]:80 default_server ipv6only=on;
  20.  
  21. root /usr/share/nginx/html;
  22. index index.html index.htm;
  23.  
  24. # Make site accessible from http://localhost/
  25. server_name localhost;
  26.  
  27. location / {
  28. # First attempt to serve request as file, then
  29. # as directory, then fall back to displaying a 404.
  30. try_files $uri $uri/ =404;
  31. # Uncomment to enable naxsi on this location
  32. # include /etc/nginx/naxsi.rules
  33. }
  34.  
  35. # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
  36. #location /RequestDenied {
  37. # proxy_pass http://127.0.0.1:8080;
  38. #}
  39.  
  40. #error_page 404 /404.html;
  41.  
  42. # redirect server error pages to the static page /50x.html
  43. #
  44. #error_page 500 502 503 504 /50x.html;
  45. #location = /50x.html {
  46. # root /usr/share/nginx/html;
  47. #}
  48.  
  49. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  50. #
  51. #location ~ \.php$ {
  52. # fastcgi_split_path_info ^(.+\.php)(/.+)$;
  53. # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  54. #
  55. # # With php5-cgi alone:
  56. # fastcgi_pass 127.0.0.1:9000;
  57. # # With php5-fpm:
  58. # fastcgi_pass unix:/var/run/php5-fpm.sock;
  59. # fastcgi_index index.php;
  60. # include fastcgi_params;
  61. #}
  62.  
  63. # deny access to .htaccess files, if Apache's document root
  64. # concurs with nginx's one
  65. #
  66. #location ~ /\.ht {
  67. # deny all;
  68. #}
  69. }
  70.  
  71.  
  72. # another virtual host using mix of IP-, name-, and port-based configuration
  73. #
  74. #server {
  75. # listen 8000;
  76. # listen somename:8080;
  77. # server_name somename alias another.alias;
  78. # root html;
  79. # index index.html index.htm;
  80. #
  81. # location / {
  82. # try_files $uri $uri/ =404;
  83. # }
  84. #}
  85.  
  86.  
  87. # HTTPS server
  88. #
  89. #server {
  90. # listen 443;
  91. # server_name localhost;
  92. #
  93. # root html;
  94. # index index.html index.htm;
  95. #
  96. # ssl on;
  97. # ssl_certificate cert.pem;
  98. # ssl_certificate_key cert.key;
  99. #
  100. # ssl_session_timeout 5m;
  101. #
  102. # ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
  103. # ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
  104. # ssl_prefer_server_ciphers on;
  105. #
  106. # location / {
  107. # try_files $uri $uri/ =404;
  108. # }
  109. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement