Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2015
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.24 KB | None | 0 0
  1. server {
  2. listen *:80;
  3.  
  4.  
  5. server_name MYWEBSITE www.MYWEBSITE;
  6.  
  7. root /var/www/MYWEBSITE/web;
  8.  
  9.  
  10.  
  11. index index.html index.htm index.php index.cgi index.pl index.xhtml;
  12.  
  13.  
  14. location ~ \.shtml$ {
  15. ssi on;
  16. }
  17.  
  18.  
  19. error_page 400 /error/400.html;
  20. error_page 401 /error/401.html;
  21. error_page 403 /error/403.html;
  22. error_page 404 /error/404.html;
  23. error_page 405 /error/405.html;
  24. error_page 500 /error/500.html;
  25. error_page 502 /error/502.html;
  26. error_page 503 /error/503.html;
  27. recursive_error_pages on;
  28. location = /error/400.html {
  29.  
  30. internal;
  31. }
  32. location = /error/401.html {
  33.  
  34. internal;
  35. }
  36. location = /error/403.html {
  37.  
  38. internal;
  39. }
  40. location = /error/404.html {
  41.  
  42. internal;
  43. }
  44. location = /error/405.html {
  45.  
  46. internal;
  47. }
  48. location = /error/500.html {
  49.  
  50. internal;
  51. }
  52. location = /error/502.html {
  53.  
  54. internal;
  55. }
  56. location = /error/503.html {
  57.  
  58. internal;
  59. }
  60.  
  61. error_log /var/log/ispconfig/httpd/MYWEBSITE/error.log;
  62. access_log /var/log/ispconfig/httpd/MYWEBSITE/access.log combined;
  63.  
  64. location ~ /\. {
  65. deny all;
  66. access_log off;
  67. log_not_found off;
  68. }
  69.  
  70. location = /favicon.ico {
  71. log_not_found off;
  72. access_log off;
  73. }
  74.  
  75. location = /robots.txt {
  76. allow all;
  77. log_not_found off;
  78. access_log off;
  79. }
  80.  
  81. location /stats/ {
  82.  
  83. index index.html index.php;
  84. auth_basic "Members Only";
  85. auth_basic_user_file /var/www/clients/client1/web1/web/stats/.htpasswd_stats;
  86. }
  87.  
  88. location ^~ /awstats-icon {
  89. alias /usr/share/awstats/icon;
  90. }
  91.  
  92. location ~ \.php$ {
  93. try_files /79560aa8b5eb1657e790dbb37525e1ae.htm @php;
  94. }
  95.  
  96. location @php {
  97. try_files $uri =404;
  98. include /etc/nginx/fastcgi_params;
  99. fastcgi_pass unix:/var/lib/php5-fpm/web1.sock;
  100. fastcgi_index index.php;
  101. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  102. fastcgi_intercept_errors on;
  103. }
  104.  
  105.  
  106.  
  107.  
  108. location /phpmyadmin {
  109. root /usr/share/;
  110. index index.php index.html index.htm;
  111. location ~ ^/phpmyadmin/(.+\.php)$ {
  112. try_files $uri =404;
  113. root /usr/share/;
  114. fastcgi_pass unix:/var/run/php5-fpm.sock;
  115. fastcgi_param HTTPS $https; # <-- add this line
  116. fastcgi_index index.php;
  117. fastcgi_param SCRIPT_FILENAME $request_filename;
  118. include /etc/nginx/fastcgi_params;
  119. fastcgi_param PATH_INFO $fastcgi_script_name;
  120. fastcgi_buffer_size 128k;
  121. fastcgi_buffers 256 4k;
  122. fastcgi_busy_buffers_size 256k;
  123. fastcgi_temp_file_write_size 256k;
  124. fastcgi_intercept_errors on;
  125. }
  126. location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
  127. root /usr/share/;
  128. }
  129. }
  130. location /phpMyAdmin {
  131. rewrite ^/* /phpmyadmin last;
  132. }
  133.  
  134. client_max_body_size 100M;
  135.  
  136. location /roundcube {
  137. root /var/lib/;
  138. index index.php index.html index.htm;
  139. location ~ (.+\.php)$ {
  140. try_files $uri =404;
  141. include /etc/nginx/fastcgi_params;
  142. fastcgi_pass unix:/var/run/php5-fpm.sock;
  143. fastcgi_index index.php;
  144. fastcgi_intercept_errors on;
  145. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  146. fastcgi_buffer_size 128k;
  147. fastcgi_buffers 256 4k;
  148. fastcgi_busy_buffers_size 256k;
  149. fastcgi_temp_file_write_size 256k;
  150. }
  151. location ~* /.svn/ {
  152. deny all;
  153. }
  154. location ~* /README|INSTALL|LICENSE|SQL|bin|CHANGELOG$ {
  155. deny all;
  156. }
  157. }
  158. location /webmail {
  159. rewrite ^ /roundcube last;
  160. }
  161.  
  162. location / {
  163. try_files $uri $uri/ /index.php?$args;
  164. }
  165.  
  166. rewrite /wp-admin$ $scheme://$host$uri/ permanent;
  167.  
  168. location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
  169. expires max;
  170. log_not_found off;
  171. }
  172.  
  173.  
  174. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement