Forum Replies Created

Viewing 15 replies - 1 through 15 (of 36 total)
  • Thread Starter SysFailure0x5a

    (@sysfailure0x5a)

    I uninstalled W3 Total Cache. Consider it “resolved”! Not buying PRO. Thank you and good night.

    Please add multisite support!

    Yeah, an option. Don’t just remove it.

    Thread Starter SysFailure0x5a

    (@sysfailure0x5a)

    Anyone on these forums? Someone has to have had this problem before…

    Thread Starter SysFailure0x5a

    (@sysfailure0x5a)

    Does no one else have this problem?

    I recently fixed this problem, but I’m on NGINX. Are you on Apache or NGINX?

    Thread Starter SysFailure0x5a

    (@sysfailure0x5a)

    Yep. The plugin forces me to network activate instead of allowing sub blog Admins to activate it themselves (or not activate based on preference). Still a 1 star rating IMHO. Especially since this is not documented anywhere. I spent a lot of time troubleshooting and back and fourth on the forums, and no one else knew why I had trouble either.

    Forcing super Admins of a multisite install to network activate is a serious bug. Er. I mean “intended feature”? Either way it’s busted. This poorly thought out “feature” is terrible, and I can’t believe it was done intentionally.

    The explanation that I received was, “well not everyone allows users of a multisite to activate plugins, even though it’s a built in feature of multisite to allow such behavior”.

    Really? Most plugins work without the need to network activated. The dev’s need to learn what a multisite installation is all about. Giving my blog owners the ability to pick what plugins they want is a HUGE and VERY IMPORTANT feature of WordPress Multisite.

    So BBPress 2.X is busted for WordPress 3.6 as it stands.

    Thread Starter SysFailure0x5a

    (@sysfailure0x5a)

    Nevermind. I had to enable minify and leave “Apply the settings above to the entire network” unchecked. I had left minify unchecked because I did not want it on by default…

    Thread Starter SysFailure0x5a

    (@sysfailure0x5a)

    Resolving the thread.

    Thread Starter SysFailure0x5a

    (@sysfailure0x5a)

    No problem. It has been stable for me this entire time. So it is indeed a 100% fix for me.

    Thread Starter SysFailure0x5a

    (@sysfailure0x5a)

    Marking as resolved.

    Thread Starter SysFailure0x5a

    (@sysfailure0x5a)

    I kind of stole the /etc/nginx/sites-enabled from the apache way of doing things. You just create a symlink from /etc/nginx/sites-available or simply issue a “mv” command between the two to enable or disable sites. Good for maintenance and testing/swapping configs. I also host a few other domains so it helps keep things organized.

    Varnish wasn’t really put in place to reduce load. Nginx is already very low on cpu and memory. So, since I have all this extra memory laying around Varnish can keep all cached and static files directly in RAM which is great. So images, txt and other static files, html, gzip, etc are kept in RAM if someone has accessed them before. I have my own dedicated server so I can spin up VPS’s with decent amounts of memory. I’ve dedicated 512MB of RAM just for varnish caching, will add more if I start getting more traffic.

    It’s also nice because it can load balance between two back ends. I could put Vanrish on it’s on server and split my webs server into two app tiers and point varnish to both.

    Thread Starter SysFailure0x5a

    (@sysfailure0x5a)

    Yeah, I don’t believe I was getting files in that directory with it enabled or disabled. Well at any rate I have this fixed. I pretty much wiped my config and started completely over from scratch. Maybe a syntax error somewhere in the code that wasn’t being logged… Not sure. Here is what I have now if anyone else is interested. It may not be perfect, but it works for me.

    This config works on my WordPress Multisite 3.6.1 with NGINX 1.4.2 on Ubuntu Server 13.04 with Varnish 3.0.4 in front of everything and W3 Total Cache 0.9.3 with Page Cache, Minify, and all the other nice features enabled. You will need to change 8080 to 80 if you don’t have a caching server in front of nginx.

    /etc/nginx/nginx.conf

    user nginx;
    worker_processes 16; # Change this to your CPU/Core count
    pid /run/nginx.pid;
    
    events {
            worker_connections 1024;
            multi_accept on;
    }
    
    http {
    
            sendfile on;
            tcp_nopush on;
            keepalive_timeout 120;
            client_max_body_size 512M;
            server_tokens on;
    
            include /etc/nginx/mime.types;
            default_type application/octet-stream;
    
            access_log /var/log/nginx/access.log;
            error_log /var/log/nginx/error.log;
    
            gzip on;
            gzip_disable "msie6";
            gzip_vary on;
            gzip_comp_level 7;
            gzip_proxied any;
            gzip_buffers 16 8k;
            gzip_http_version 1.1;
            gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
    
            include /etc/nginx/conf.d/*.conf;
            include /etc/nginx/sites-enabled/*;
    
    }

    /etc/nginx/sites-enabled/example.net

    server {
            server_name example.net *.example.net;
            listen 8080 default_server;  #remove default_server if not using multisite.
            server_name_in_redirect off; #disable if not using multisite.
            root /var/www/example.net;
            index index.php;
            charset utf-8;
    
            fastcgi_buffers 16 16k;
            fastcgi_buffer_size 32k;
    
            #error and log for just this domain
            access_log   /var/log/nginx/examplenet-access.log;
            error_log    /var/log/nginx/examplenet-error.log;
    
            location ~ \.php$ {
                    try_files $uri /index.php;
                    include /etc/nginx/fastcgi_params;
                    fastcgi_read_timeout 240;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_param SCRIPT_FILENAME /var/www/example.net$fastcgi_script_name;
    
            }
    
            location / { try_files $uri $uri/ /index.php?$args ;    }
            location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
                    access_log off;
                    log_not_found off;
                    expires max; }
    
            location = /robots.txt { access_log off; log_not_found off; }
            location ~ /\. { deny  all; access_log off; log_not_found off; }
    
            rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
            rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
    
            # START W3 TOTAL CACHE CONFIG
            # BEGIN W3TC Minify cache
            location ~ /wp-content/cache/minify.*\.js$ {
                    types {}
                    default_type application/x-javascript;
                    add_header Vary "Accept-Encoding";
            }
            location ~ /wp-content/cache/minify.*\.css$ {
                    types {}
                    default_type text/css;
                    add_header Vary "Accept-Encoding";
            }
    
            location ~ /wp-content/cache/minify.*js\.gzip$ {
                    gzip off;
                    types {}
                    default_type application/x-javascript;
                    add_header Vary "Accept-Encoding";
                    add_header Content-Encoding gzip;
            }
    
            location ~ /wp-content/cache/minify.*css\.gzip$ {
                    gzip off;
                    types {}
                    default_type text/css;
                    add_header Vary "Accept-Encoding";
                    add_header Content-Encoding gzip;
            }
            # END W3TC Minify cache
            # BEGIN W3TC Page Cache cache
    
            location ~ /wp-content/cache/page_enhanced.*html$ {
                    add_header Vary "Accept-Encoding, Cookie";
            }
    
            location ~ /wp-content/cache/page_enhanced.*gzip$ {
                    gzip off;
                    types {}
                    default_type text/html;
                    add_header Vary "Accept-Encoding, Cookie";
                    add_header Content-Encoding gzip;
            }
    
            # END W3TC Page Cache cache
            # BEGIN W3TC Browser Cache
            gzip on;
            gzip_types text/css text/x-component application/x-javascript application/javascript
            text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl
            text/xml image/x-icon;
    
            # END W3TC Browser Cache
            # BEGIN W3TC Minify core
    
            rewrite ^/wp-content/cache/minify.*/w3tc_rewrite_test$ /wp-content/plugins/w3-total-cache/pub/minify.php?w3tc_rewrite_test=1 last;
            set $w3tc_enc "";
            if ($http_accept_encoding ~ gzip) {
            set $w3tc_enc .gzip;
            }
    
            if (-f $request_filename$w3tc_enc) {
            rewrite (.*) $1$w3tc_enc break;
            }
    
            rewrite ^/wp-content/cache/minify/(.+/[X]+\.css)$ /wp-content/plugins/w3-total-cache/pub/minify.php?test_file=$1 last;
            rewrite ^/wp-content/cache/minify/(.+\.(css|js))$ /wp-content/plugins/w3-total-cache/pub/minify.php?file=$1 last;
    
            # END W3TC Minify core
            # BEGIN W3TC Page Cache core
            set $w3tc_rewrite 1;
            if ($request_method = POST) {
            set $w3tc_rewrite 0;
            }
    
            if ($query_string != "") {
            set $w3tc_rewrite 0;
            }
    
            if ($request_uri !~ \/$) {
            set $w3tc_rewrite 0;
            }
    
            if ($http_cookie ~* "(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle)") {
            set $w3tc_rewrite 0;
            }
    
            set $w3tc_enc "";
            if ($http_accept_encoding ~ gzip) {
            set $w3tc_enc _gzip;
            }
    
            if (!-f "$document_root/wp-content/cache/page_enhanced/$http_host/$request_uri/_index.html$w3tc_enc") {
            set $w3tc_rewrite 0;
            }
    
            if ($w3tc_rewrite = 1) {
            rewrite .* "/wp-content/cache/page_enhanced/$http_host/$request_uri/_index.html$w3tc_enc" last;
            }
            # END W3TC Page Cache core
    
    }

    Thread Starter SysFailure0x5a

    (@sysfailure0x5a)

    There are no files in /cache/ or /cache/minify/

    I’ll look at your config again later today.

    Thread Starter SysFailure0x5a

    (@sysfailure0x5a)

    The code is automatically placed into the .conf file just like it places it in the .htaccess for apache.

    I’ve probably click and unclicked and enabled and disabled every feature twice in the software and my web server. Un ticking and re-ticking the box has no effect, it breaks again when it’s checked.

    I checked that link. Using their config file instead of mine had no change. All my other rewrites work perfectly fine. Pretty permalinks for example.

Viewing 15 replies - 1 through 15 (of 36 total)