Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen *:80;
- server_name foodandchatter.co.za www.foodandchatter.co.za;
- root /var/www/foodandchatter.co.za/web;
- index index.html index.htm index.php index.cgi index.pl index.xhtml;
- error_log /var/log/ispconfig/httpd/foodandchatter.co.za/error.log;
- access_log /var/log/ispconfig/httpd/foodandchatter.co.za/access.log combined buffer=32k;
- ## Disable .htaccess and other hidden files
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- location /stats {
- index index.html index.php;
- auth_basic "Members Only";
- auth_basic_user_file /var/www/clients/client2/web8/web/stats/.htpasswd_stats;
- }
- location ^~ /awstats-icon {
- alias /usr/share/awstats/icon;
- }
- location ~ \.php$ {
- try_files /dc2c9cd0a963abe130f558ccca84e2e9.htm @php;
- }
- location @php {
- try_files $uri =404;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass unix:/var/lib/php5-fpm/web8.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- #fastcgi_param PATH_INFO $fastcgi_script_name;
- fastcgi_intercept_errors on;
- fastcgi_buffer_size 128k;
- fastcgi_buffers 256 16k;
- fastcgi_busy_buffers_size 256k;
- fastcgi_temp_file_write_size 256k;
- fastcgi_read_timeout 240;
- fastcgi_cache_bypass $skip_cache;
- fastcgi_no_cache $skip_cache;
- fastcgi_cache WORDPRESS;
- fastcgi_cache_valid 60m;
- }
- location /webmail {
- root /var/www/;
- index index.php index.html index.htm;
- location ~ ^/webmail/(.+\.php)$ {
- try_files $uri =404;
- root /var/www/;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- fastcgi_buffer_size 128k;
- fastcgi_buffers 256 4k;
- fastcgi_busy_buffers_size 256k;
- fastcgi_temp_file_write_size 256k;
- fastcgi_intercept_errors on;
- }
- location ~* ^/webmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /var/www/;
- }
- }
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- location ~* \.(jpg|jpeg|png|gif|ico|pdf)$ {
- expires 7d;
- }
- location /phpmyadmin {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_param HTTPS $fastcgi_https; # <-- add this line
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- fastcgi_buffer_size 128k;
- fastcgi_buffers 256 4k;
- fastcgi_busy_buffers_size 256k;
- fastcgi_temp_file_write_size 256k;
- fastcgi_intercept_errors on;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- }
- location /phpMyAdmin {
- rewrite ^/* /phpmyadmin last;
- }
- #activating fastcgi_cache
- set $skip_cache 0;
- # POST requests and urls with a query string should always go to PHP
- if ($request_method = POST) { set $skip_cache 1; }
- if ($query_string != "") { set $skip_cache 1; }
- #Skip cache for WooCommerce query string
- if ( $arg_add-to-cart != "" ) { set $skip_cache 1; }
- #Skip cache when WooCommerce cart is not empty
- if ( $cookie_woocommerce_items_in_cart != "0" ) { set $skip_cache 1; }
- # Don't use the cache for logged in users or recent commenters
- if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") { set $skip_cache 1; }
- # Don't cache uris containing the following segments
- 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; }
- location ~ /purge(/.*) {
- fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
- }
- }
- server {
- listen *:80;
- server_name foodandchaatter.co.za;
- rewrite ^ http://foodandchatter.co.za$request_uri? permanent;
- }
- server {
- listen *:80;
- server_name www.foodandchaatter.co.za;
- if ($http_host != "foodandchaatter.co.za") {
- rewrite ^ $scheme://foodandchaatter.co.za$request_uri? permanent;
- }
- rewrite ^ http://foodandchatter.co.za$request_uri? permanent;
- }
- server {
- listen *:80;
- server_name food-and-chaatter.co.za;
- rewrite ^ http://foodandchatter.co.za$request_uri? permanent;
- }
- server {
- listen *:80;
- server_name www.food-and-chaatter.co.za;
- if ($http_host != "food-and-chaatter.co.za") {
- rewrite ^ $scheme://food-and-chaatter.co.za$request_uri? permanent;
- }
- rewrite ^ http://foodandchatter.co.za$request_uri? permanent;
- }
- server {
- listen *:80;
- server_name foodchaatter.co.za;
- rewrite ^ http://foodandchatter.co.za$request_uri? permanent;
- }
- server {
- listen *:80;
- server_name www.foodchaatter.co.za;
- if ($http_host != "foodchaatter.co.za") {
- rewrite ^ $scheme://foodchaatter.co.za$request_uri? permanent;
- }
- rewrite ^ http://foodandchatter.co.za$request_uri? permanent;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement