Advertisement
ovizii

foodandchatter.co.za.vhost

Oct 30th, 2013
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.42 KB | None | 0 0
  1. server {
  2. listen *:80;
  3.  
  4. server_name foodandchatter.co.za www.foodandchatter.co.za;
  5.  
  6. root /var/www/foodandchatter.co.za/web;
  7.  
  8.  
  9.  
  10. index index.html index.htm index.php index.cgi index.pl index.xhtml;
  11.  
  12.  
  13.  
  14. error_log /var/log/ispconfig/httpd/foodandchatter.co.za/error.log;
  15. access_log /var/log/ispconfig/httpd/foodandchatter.co.za/access.log combined buffer=32k;
  16.  
  17. location ~ /\. {
  18. deny all;
  19. access_log off;
  20. log_not_found off;
  21. }
  22.  
  23. location = /favicon.ico {
  24. log_not_found off;
  25. access_log off;
  26. }
  27.  
  28. location = /robots.txt {
  29. allow all;
  30. log_not_found off;
  31. access_log off;
  32. }
  33.  
  34. location /stats {
  35.  
  36. index index.html index.php;
  37. auth_basic "Members Only";
  38. auth_basic_user_file /var/www/clients/client2/web8/web/stats/.htpasswd_stats;
  39. }
  40.  
  41. location ^~ /awstats-icon {
  42. alias /usr/share/awstats/icon;
  43. }
  44.  
  45. location ~ \.php$ {
  46. try_files /e1b3dcc36950833a2c65aaee068f9022.htm @php;
  47. }
  48.  
  49. location @php {
  50. try_files $uri =404;
  51. include /etc/nginx/fastcgi_params;
  52. fastcgi_pass unix:/var/lib/php5-fpm/web8.sock;
  53. fastcgi_index index.php;
  54. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  55. fastcgi_intercept_errors on;
  56. fastcgi_buffer_size 128k;
  57. fastcgi_buffers 256 16k;
  58. fastcgi_busy_buffers_size 256k;
  59. fastcgi_temp_file_write_size 256k;
  60. fastcgi_read_timeout 3000;
  61. fastcgi_cache_bypass $skip_cache;
  62. fastcgi_no_cache $skip_cache;
  63. fastcgi_cache WORDPRESS;
  64. fastcgi_cache_valid 60m;
  65. }
  66. location /webmail {
  67. root /var/www/;
  68. index index.php index.html index.htm;
  69. location ~ ^/webmail/(.+\.php)$ {
  70. try_files $uri =404;
  71. root /var/www/;
  72. fastcgi_pass 127.0.0.1:9000;
  73. fastcgi_index index.php;
  74. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  75. include /etc/nginx/fastcgi_params;
  76. fastcgi_buffer_size 128k;
  77. fastcgi_buffers 256 4k;
  78. fastcgi_busy_buffers_size 256k;
  79. fastcgi_temp_file_write_size 256k;
  80. fastcgi_intercept_errors on;
  81. }
  82. location ~* ^/webmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
  83. root /var/www/;
  84. }
  85. }
  86.  
  87.  
  88. location / {
  89. try_files $uri $uri/ /index.html /index.php?$args;
  90. }
  91. location ~* \.(jpg|jpeg|png|gif|ico|pdf)$ {
  92. expires 7d;
  93. }
  94. location /phpmyadmin {
  95. root /usr/share/;
  96. index index.php index.html index.htm;
  97. location ~ ^/phpmyadmin/(.+\.php)$ {
  98. try_files $uri =404;
  99. root /usr/share/;
  100. fastcgi_pass 127.0.0.1:9000;
  101. fastcgi_param HTTPS $fastcgi_https; # <-- add this line
  102. fastcgi_index index.php;
  103. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  104. include /etc/nginx/fastcgi_params;
  105. fastcgi_buffer_size 128k;
  106. fastcgi_buffers 256 4k;
  107. fastcgi_busy_buffers_size 256k;
  108. fastcgi_temp_file_write_size 256k;
  109. fastcgi_intercept_errors on;
  110. }
  111. location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
  112. root /usr/share/;
  113. }
  114. }
  115. location /phpMyAdmin {
  116. rewrite ^/* /phpmyadmin last;
  117. }
  118. set $skip_cache 0;
  119.  
  120. if ($request_method = POST) { set $skip_cache 1; }
  121. if ($query_string != "") { set $skip_cache 1; }
  122.  
  123. if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") { set $skip_cache 1; }
  124.  
  125. if ($request_uri ~* ("/wp-admin.*|/cart.*|/checkout.*|/account.*|/myaccount.*|/addond.*|/store.*|/shop.*|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-ocations.php|sitemap(_index)?.xml|a-z0-9_-]+-sitemap([0-9]+)?.xml)") { set $skip_cache 1; }
  126.  
  127.  
  128. location ~ /purge(/.*) {
  129. }
  130.  
  131. location ~ ([^/]*)sitemap(.*)\.xml$ {
  132. rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
  133. rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
  134. }
  135.  
  136.  
  137. }
  138.  
  139. server {
  140. listen *:80;
  141.  
  142.  
  143. server_name foodandchaatter.co.za;
  144. rewrite ^ http://foodandchatter.co.za$request_uri? permanent;
  145. }
  146. server {
  147. listen *:80;
  148.  
  149.  
  150. server_name www.foodandchaatter.co.za;
  151. if ($http_host != "foodandchaatter.co.za") {
  152. rewrite ^ $scheme://foodandchaatter.co.za$request_uri? permanent;
  153. }
  154. rewrite ^ http://foodandchatter.co.za$request_uri? permanent;
  155. }
  156. server {
  157. listen *:80;
  158.  
  159.  
  160. server_name food-and-chaatter.co.za;
  161. rewrite ^ http://foodandchatter.co.za$request_uri? permanent;
  162. }
  163. server {
  164. listen *:80;
  165.  
  166.  
  167. server_name www.food-and-chaatter.co.za;
  168. if ($http_host != "food-and-chaatter.co.za") {
  169. rewrite ^ $scheme://food-and-chaatter.co.za$request_uri? permanent;
  170. }
  171. rewrite ^ http://foodandchatter.co.za$request_uri? permanent;
  172. }
  173. server {
  174. listen *:80;
  175.  
  176.  
  177. server_name foodchaatter.co.za;
  178. rewrite ^ http://foodandchatter.co.za$request_uri? permanent;
  179. }
  180. server {
  181. listen *:80;
  182.  
  183.  
  184. server_name www.foodchaatter.co.za;
  185. if ($http_host != "foodchaatter.co.za") {
  186. rewrite ^ $scheme://foodchaatter.co.za$request_uri? permanent;
  187. }
  188. rewrite ^ http://foodandchatter.co.za$request_uri? permanent;
  189. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement