Guest User

Untitled

a guest
Feb 19th, 2013
65
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # You may add here your
  2. server {
  3. listen 80;
  4. root /opt/www/;
  5. index index.html index.htm index.php;
  6.  
  7. location /forum/ {
  8. try_files $uri $uri/ /forum/index.php?$uri&$args;
  9. }
  10.  
  11. location ~ /forum/(internal_data|library) {
  12. internal;
  13. }
  14.  
  15. location ~ \.php$ {
  16. fastcgi_pass unix:/tmp/php.socket;
  17. fastcgi_index index.php;
  18. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  19. include fastcgi_params;
  20. }
  21. }
  22. # statements for each of your virtual hosts to this file
  23.  
  24. ##
  25. # You should look at the following URL's in order to grasp a solid understanding
  26. # of Nginx configuration files in order to fully unleash the power of Nginx.
  27. # http://wiki.nginx.org/Pitfalls
  28. # http://wiki.nginx.org/QuickStart
  29. # http://wiki.nginx.org/Configuration
  30. #
  31. # Generally, you will want to move this file somewhere, and start with a clean
  32. # file but keep this around for reference. Or just disable in sites-enabled.
  33. #
  34. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  35. ##
  36.  
  37. server {
  38. #listen 80; ## listen for ipv4; this line is default and implied
  39. #listen [::]:80 default ipv6only=on; ## listen for ipv6
  40.  
  41. root /usr/share/nginx/www;
  42. index index.html index.htm;
  43.  
  44. # Make site accessible from http://localhost/
  45. server_name localhost;
  46.  
  47. location / {
  48. # First attempt to serve request as file, then
  49. # as directory, then fall back to index.html
  50. try_files $uri $uri/ /index.html;
  51. # Uncomment to enable naxsi on this location
  52. # include /etc/nginx/naxsi.rules
  53. }
  54.  
  55. location /doc/ {
  56. alias /usr/share/doc/;
  57. autoindex on;
  58. allow 127.0.0.1;
  59. deny all;
  60. }
  61.  
  62. # Only for nginx-naxsi : process denied requests
  63. #location /RequestDenied {
  64. # For example, return an error code
  65. #return 418;
  66. #}
  67.  
  68. #error_page 404 /404.html;
  69.  
  70. # redirect server error pages to the static page /50x.html
  71. #
  72. #error_page 500 502 503 504 /50x.html;
  73. #location = /50x.html {
  74. # root /usr/share/nginx/www;
  75. #}
  76.  
  77. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  78. #
  79. #location ~ \.php$ {
  80. # fastcgi_split_path_info ^(.+\.php)(/.+)$;
  81. # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  82. #
  83. # # With php5-cgi alone:
  84. # fastcgi_pass 127.0.0.1:9000;
  85. # # With php5-fpm:
  86. # fastcgi_pass unix:/var/run/php5-fpm.sock;
  87. # fastcgi_index index.php;
  88. # include fastcgi_params;
  89. #}
  90.  
  91. # deny access to .htaccess files, if Apache's document root
  92. # concurs with nginx's one
  93. #
  94. #location ~ /\.ht {
  95. # deny all;
  96. #}
  97. }
  98.  
  99.  
  100. # another virtual host using mix of IP-, name-, and port-based configuration
  101. #
  102. #server {
  103. # listen 8000;
  104. # listen somename:8080;
  105. # server_name somename alias another.alias;
  106. # root html;
  107. # index index.html index.htm;
  108. #
  109. # location / {
  110. # try_files $uri $uri/ /index.html;
  111. # }
  112. #}
  113.  
  114.  
  115. # HTTPS server
  116. #
  117. #server {
  118. # listen 443;
  119. # server_name localhost;
  120. #
  121. # root html;
  122. # index index.html index.htm;
  123. #
  124. # ssl on;
  125. # ssl_certificate cert.pem;
  126. # ssl_certificate_key cert.key;
  127. #
  128. # ssl_session_timeout 5m;
  129. #
  130. # ssl_protocols SSLv3 TLSv1;
  131. # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
  132. # ssl_prefer_server_ciphers on;
  133. #
  134. # location / {
  135. # try_files $uri $uri/ /index.html;
  136. # }
  137. #}
RAW Paste Data