Advertisement
Guest User

Untitled

a guest
Apr 25th, 2013
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.95 KB | None | 0 0
  1.  
  2. #user html;
  3. worker_processes 4;
  4.  
  5. #error_log logs/error.log;
  6. #error_log logs/error.log notice;
  7. #error_log logs/error.log info;
  8.  
  9. #pid logs/nginx.pid;
  10.  
  11.  
  12. events {
  13. worker_connections 1024;
  14. }
  15.  
  16.  
  17. http {
  18. include mime.types;
  19. default_type application/octet-stream;
  20.  
  21. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  22. # '$status $body_bytes_sent "$http_referer" '
  23. # '"$http_user_agent" "$http_x_forwarded_for"';
  24.  
  25. #access_log logs/access.log main;
  26.  
  27. sendfile on;
  28. #tcp_nopush on;
  29.  
  30. #keepalive_timeout 0;
  31. keepalive_timeout 65;
  32.  
  33. #gzip on;
  34.  
  35. server {
  36. listen 80;
  37. server_name localhost;
  38.  
  39. root /var/www;
  40. index index.html index.htm index.php;
  41.  
  42. #charset koi8-r;
  43.  
  44. #access_log logs/host.access.log main;
  45.  
  46. #location / {
  47. # #try_files $uri $uri/ /index.html;
  48. #}
  49.  
  50. location /xenforo/ {
  51. try_files $uri $uri/ /xenforo/index.php?$uri&$args;
  52. }
  53.  
  54. location ~ /xenforo/(internal_data|library) {
  55. internal;
  56. }
  57.  
  58. #error_page 404 /404.html;
  59.  
  60. # redirect server error pages to the static page /50x.html
  61. #
  62. error_page 500 502 503 504 /50x.html;
  63. location = /50x.html {
  64. root /usr/share/nginx/html;
  65. }
  66.  
  67. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  68. #
  69. #location ~ \.php$ {
  70. # proxy_pass http://127.0.0.1;
  71. #}
  72.  
  73. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  74. #
  75. location ~ \.php$ {
  76. # root html;
  77. fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  78. fastcgi_index index.php;
  79. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  80. include fastcgi_params;
  81. }
  82.  
  83. # deny access to .htaccess files, if Apache's document root
  84. # concurs with nginx's one
  85.  
  86. location ~ /\.ht {
  87. deny all;
  88. }
  89. }
  90.  
  91. server {
  92. listen [::]:80;
  93. server_name example.com www.example.com;
  94.  
  95. root /var/www/example.com/public_html;
  96. index index.php index.html index.htm;
  97.  
  98. #charset koi8-r;
  99.  
  100. access_log /var/log/nginx/example.com.access_log;
  101. error_log /var/log/nginx/example.com.error_log; ##Logfile für die Fehler
  102.  
  103. #location / {
  104. #try_files $uri $uri/ /index.php;
  105. #rewrite ^/$ /index.php?page=Home;
  106. #}
  107.  
  108. #error_page 404 /404.html;
  109.  
  110. # redirect server error pages to the static page /50x.html
  111. #
  112. error_page 500 502 503 504 /50x.html;
  113. location = /50x.html {
  114. root /usr/share/nginx/html;
  115. }
  116.  
  117. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  118.  
  119. location ~ \.php$ {
  120. #try_files $uri =404; ##Funktioniert eingeschaltet nicht
  121. fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  122. fastcgi_index index.php;
  123. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  124. include fastcgi_params;
  125. }
  126.  
  127. # deny access to .htaccess files, if Apache's document root
  128. # concurs with nginx's one
  129.  
  130. location ~ /\.ht {
  131. deny all;
  132. }
  133. }
  134.  
  135. # HTTPS server
  136. #
  137. #server {
  138. # listen 443;
  139. # server_name localhost;
  140.  
  141. # ssl on;
  142. # ssl_certificate cert.pem;
  143. # ssl_certificate_key cert.key;
  144.  
  145. # ssl_session_timeout 5m;
  146.  
  147. # ssl_protocols SSLv2 SSLv3 TLSv1;
  148. # ssl_ciphers HIGH:!aNULL:!MD5;
  149. # ssl_prefer_server_ciphers on;
  150.  
  151. # location / {
  152. # root html;
  153. # index index.html index.htm;
  154. # }
  155. #}
  156.  
  157. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement