Advertisement
Guest User

nginx php5

a guest
Aug 14th, 2011
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.89 KB | None | 0 0
  1. user www-data;
  2. worker_processes 1;
  3.  
  4. error_log /var/log/nginx/error.log;
  5. pid /var/run/nginx.pid;
  6.  
  7. events {
  8. worker_connections 1024;
  9. # multi_accept on;
  10. }
  11.  
  12. http {
  13. include /etc/nginx/mime.types;
  14.  
  15. access_log /var/log/nginx/access.log;
  16.  
  17. sendfile on;
  18. #tcp_nopush on;
  19.  
  20. #keepalive_timeout 0;
  21. keepalive_timeout 65;
  22. tcp_nodelay on;
  23.  
  24. gzip on;
  25. gzip_disable "MSIE [1-6]\.(?!.*SV1)";
  26.  
  27. include /etc/nginx/conf.d/*.conf;
  28. include /etc/nginx/sites-enabled/*;
  29. }
  30.  
  31. # mail {
  32. # # See sample authentication script at:
  33. # # http://wiki.nginx.org/NginxImapAuthenticateWithApachePhpScript
  34. #
  35. # # auth_http localhost/auth.php;
  36. # # pop3_capabilities "TOP" "USER";
  37. # # imap_capabilities "IMAP4rev1" "UIDPLUS";
  38. #
  39. # server {
  40. # listen localhost:110;
  41. # protocol pop3;
  42. # proxy on;
  43. # }
  44. #
  45. # server {
  46. # listen localhost:143;
  47. # protocol imap;
  48. # proxy on;
  49. # }
  50. # }
  51.  
  52. -----------------sites-available default file -----------------------
  53.  
  54. server {
  55.  
  56. listen 80; ## listen for ipv4
  57. listen [::]:80 default ipv6only=on; ## listen for ipv6
  58.  
  59. server_name localhost;
  60.  
  61. access_log /var/log/nginx/localhost.access.log;
  62.  
  63. location / {
  64. root /var/www;
  65. index index.php index.html index.htm;
  66. }
  67.  
  68. location /doc {
  69. root /usr/share;
  70. autoindex on;
  71. allow 127.0.0.1;
  72. deny all;
  73. }
  74.  
  75. location /images {
  76. root /usr/share;
  77. autoindex on;
  78. }
  79.  
  80. #error_page 404 /404.html;
  81.  
  82. # redirect server error pages to the static page /50x.html
  83. #
  84. #error_page 500 502 503 504 /50x.html;
  85. location = /50x.html {
  86. root /var/www/nginx-default;
  87. }
  88.  
  89. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  90. #
  91. #location ~ \.php$ {
  92. #proxy_pass http://127.0.0.1;
  93. #}
  94.  
  95. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  96. #
  97. location ~ \.php$ {
  98. fastcgi_pass 127.0.0.1:9000;
  99. fastcgi_index index.php;
  100. fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  101. include fastcgi_params;
  102. }
  103.  
  104. # deny access to .htaccess files, if Apache's document root
  105. # concurs with nginx's one
  106. #
  107. location ~ /\.ht {
  108. deny all;
  109. }
  110. }
  111.  
  112.  
  113. # another virtual host using mix of IP-, name-, and port-based configuration
  114. #
  115. #server {
  116. #listen 8000;
  117. #listen somename:8080;
  118. #server_name somename alias another.alias;
  119.  
  120. #location / {
  121. #root html;
  122. #index index.html index.htm;
  123. #}
  124. #}
  125.  
  126.  
  127. # HTTPS server
  128. #
  129. #server {
  130. #listen 443;
  131. #server_name localhost;
  132.  
  133. #ssl on;
  134. #ssl_certificate cert.pem;
  135. #ssl_certificate_key cert.key;
  136.  
  137. #ssl_session_timeout 5m;
  138.  
  139. #ssl_protocols SSLv3 TLSv1;
  140. #ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
  141. #ssl_prefer_server_ciphers on;
  142.  
  143. #location / {
  144. #root html;
  145. #index index.html index.htm;
  146. #}
  147. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement