Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # WPSINGLE W3 TOTAL CACHE NGINX CONFIGURATION
- server {
- server_name arcwaveusa.com www.arcwaveusa.com;
- access_log /var/log/nginx/arcwaveusa.com.access.log rt_cache;
- error_log /var/log/nginx/arcwaveusa.com.error.log;
- root /var/www/arcwaveusa.com/htdocs;
- index index.php index.htm index.html;
- set $cache_uri $request_uri;
- # POST Requests And Urls With A Query String Should Always Go To PHP
- if ($request_method = POST) {
- set $cache_uri 'null cache';
- }
- if ($query_string != "") {
- set $cache_uri 'null cache';
- }
- # Don't Use The Cache For Logged In Users Or Recent Commenters
- if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") {
- set $cache_uri 'null cache';
- }
- # Use Cached Or Actual File If They Exists, Otherwise Pass Request To WordPress
- location / {
- try_files /wp-content/cache/page_enhanced/${host}${cache_uri}_index.html $uri $uri/ /index.php?$args;
- }
- location ~ ^/wp-content/cache/minify/(.+\.(css|js))$ {
- try_files $uri /wp-content/plugins/w3-total-cache/pub/minify.php?file=$1;
- }
- location ~ /signup/ {
- return 301 https://$server_name$request_uri;
- }
- location ~ \.php$ {
- try_files $uri =404;
- include fastcgi_params;
- fastcgi_pass php;
- }
- include common/wpcommon.conf;
- include common/locations.conf;
- }
- server {
- listen 443;
- server_name arcwaveusa.com;
- #wordpress install root
- root /var/www/arcwaveusa.com/htdocs;
- index index.php index.htm index.html;
- ssl on;
- ssl_certificate /etc/nginx/ssl/ssl-bundle.crt;
- ssl_certificate_key /etc/nginx/ssl/server.key;
- ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM;
- ssl_protocols SSLv3 TLSv1;
- access_log /var/log/nginx/arcwaveusa.com.access.log rt_cache;
- error_log /var/log/nginx/arcwaveusa.com.error.log;
- set $cache_uri $request_uri;
- # POST Requests And Urls With A Query String Should Always Go To PHP
- if ($request_method = POST) {
- set $cache_uri 'null cache';
- }
- if ($query_string != "") {
- set $cache_uri 'null cache';
- }
- # Don't Use The Cache For Logged In Users Or Recent Commenters
- if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") {
- set $cache_uri 'null cache';
- }
- # Use Cached Or Actual File If They Exists, Otherwise Pass Request To WordPress
- location / {
- try_files /wp-content/cache/page_enhanced/${host}${cache_uri}_index.html $uri $uri/ /index.php?$args;
- }
- location ~ ^/wp-content/cache/minify/(.+\.(css|js))$ {
- try_files $uri /wp-content/plugins/w3-total-cache/pub/minify.php?file=$1;
- }
- location ~ /signup/ {
- return 301 https://$server_name$request_uri;
- }
- location ~ \.php$ {
- try_files $uri =404;
- include fastcgi_params;
- fastcgi_pass php;
- }
- include common/wpcommon.conf;
- include common/locations.conf;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement