Forum Replies Created

Viewing 15 replies - 16 through 30 (of 36 total)
  • Thread Starter vampired

    (@vampired)

    I’m doing hostname (since there are multiple virtual hosts on the machine, so doing IP will return error 404 Not in Cache).

    If I use Hostname, it’s getting picked up by CloudFlare.

    So your plugin is just replacing hostname w/ IP? If so, that’s not going to work as it won’t know what site to purge and there is no content cached on IP/anyurl.

    Thread Starter vampired

    (@vampired)

    If I do a curl -X PURGE IP it works fine, I get a 200 purged response.

    This is the same IP I am using in the define and what’s in the default.vcl as authorized.

    EDIT: This site does not have W3 Total Cache installed. (Not yet) but this is a problem I’ve been trying to solve for ages with W3 Total Cache not purging Varnish. I’ve Varnish Purge Plugin for a while but it never worked for me.

    I’d really like to get this working so I don’t have to keep SSH in to restart varnish when making changing and trying to see results quickly.

    Thread Starter vampired

    (@vampired)

    I tried using the public IP and 127.0.0.1. (restarting varnish after changing it).

    Neither will purge it, but if I do a service varnish restart I can see the content updated.

    Thread Starter vampired

    (@vampired)

    I suspected that was the case, but I wasn’t sure.

    I have tried with the button as well, and no luck. I had the same problem with W3 Total Cache trying to get it to purge.

    Thread Starter vampired

    (@vampired)

    100% sure. Nginx & Varnish are both on the same box, Varnish is port 80 and nginx is port 8080.

    host as in the hostname to the site. Direct I mean using the hostname CloudFlare sets up that bypasses CloudFlare and goes directly to server.

    If I use direct.hostname.com, my varnish server responds to the purge request and will purge the content, but it isn’t caching content at direct.hostname.com so that does no good (but does confirm Varnish is properly setup to purge).

    If I use https://www.hostname.com to purge, I get a 503 unauthorized and it is coming from CloudFlare-NGINX. So I know CloudFlare is picking it up.

    I tried using the Public IP and 127.0.0.1 in the VHP_VARNISH_IP directive. There is no private IP, and both public and 127.0.0.1 are authorized in default.vcl to handle purges.

    VHP_VARNISH_IP setting doesn’t seem to affect anything. It behaves the same way either way.

    I am testing using:

    curl -X PURGE https://www.hostname.com

    and

    curl -X PURGE https://direct.hostname.com (to test bypassing CloudFlare)

    Thread Starter vampired

    (@vampired)

    Thought something looked weird but I tried it anyway.

    I made the new change, still same problem. It is weird, most of the images work fine, the first 91 pages of images out of 100 smush without problems. The last 9 pages give me this odd path issue where it is appending what looks like a default path to the regular path.

    I tried CW Image Optimizer, and for some reason I couldn’t get it to work with the tools or something.

    Thread Starter vampired

    (@vampired)

    1) Tried it, didn’t solve the problem.

    Errror changed from:

    To:

    /srv/www/example.com/public/wp-content/uploads//var/www/vhosts/example.com/httpdocs/wp-content/uploads/2008/08/8-10-2008-11-21-17-pm.png

    /srv/www/example.com/public/wp-content/uploads/varwwwvhostsexample.comhttpdocswp-contentuploads2008088-10-2008-11-49-24-pm.png

    2) No chroot at all.

    The thing is, many of them work fine and smush without problems, the older stuff though throws this error which looks like it is confusing the path by taking the real path and some made one up (perhaps a default) and combining them into one ridiculous path.

    Thread Starter vampired

    (@vampired)

    server {
    listen 8080;
    server_name example.com *.example.com;
    root /srv/www/example.com/public;

    access_log /srv/www/example.com/log/access.log;
    error_log /srv/www/example.com/log/error.log;

    include wordpress.conf;
    include browsercache.conf;
    include drop.conf;
    include php.conf;
    }

    wordpress.conf:
    location / {
    index index.php;

    if (-f $request_filename) {
    break;
    }

    set $pgcache “”;

    if ($request_method = GET) { set $pgcache “${pgcache}D”; }

    if ($args = “”) { set $pgcache “${pgcache}I”; }

    if ($http_cookie !~ (comment_author_|wordpress|wordpress_logged_in|wp-postpass_)) {
    set $pgcache “${pgcache}S”;
    }
    if (-f $document_root/wp-content/w3tc/pgcache/$request_uri/_index.html) {
    set $pgcache “${pgcache}K”;
    }
    if ($pgcache = “DISK”) {
    rewrite ^ /wp-content/w3tc/pgcache/$request_uri/_index.html break;
    }

    if (!-e $request_filename) { rewrite ^ /index.php last; }
    }

    location /search {
    limit_req zone=wpsearch burst=3 nodelay;
    try_files $uri /index.php;
    }

    # Add trailing slash to */wp-admin requests.
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;

    # Prohibit php files from executing in wp-uploads
    location ~* ^/wp-content/uploads/.*.php$ {
    return 403;
    }

    # enforce www (exclude certain subdomains)
    if ($host !~* ^(www|subdomain))
    {
    rewrite ^/(.*)$ $scheme://www.$host/$1 permanent;
    }

    fastcgi_intercept_errors off;

    browsercache.conf:

    # browser cache
    location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
    expires max;
    add_header Pragma public;
    add_header Cache-Control “public, must-revalidate, proxy-revalidate”;
    }

    drop.conf:

    location = /robots.txt { access_log off; log_not_found off; }
    location = /favicon.ico { access_log off; log_not_found off; }
    location ~ /\. { access_log off; log_not_found off; deny all; }
    location ~ ~$ { access_log off; log_not_found off; deny all; }

    php.conf:

    location ~ \.php {
    client_max_body_size 25M;
    try_files $uri =404;
    limit_conn phplimit 5;
    fastcgi_index index.php;

    fastcgi_param QUERY_STRING $query_string;
    fastcgi_param REQUEST_METHOD $request_method;
    fastcgi_param CONTENT_TYPE $content_type;
    fastcgi_param CONTENT_LENGTH $content_length;

    fastcgi_param SCRIPT_FILENAME $request_filename;
    fastcgi_param SCRIPT_NAME $fastcgi_script_name;
    fastcgi_param REQUEST_URI $request_uri;
    fastcgi_param DOCUMENT_URI $document_uri;
    fastcgi_param DOCUMENT_ROOT $document_root;
    fastcgi_param SERVER_PROTOCOL $server_protocol;

    fastcgi_param GATEWAY_INTERFACE CGI/1.1;
    fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;

    fastcgi_param REMOTE_ADDR $remote_addr;
    fastcgi_param REMOTE_PORT $remote_port;
    fastcgi_param SERVER_ADDR $server_addr;
    fastcgi_param SERVER_PORT $server_port;
    fastcgi_param SERVER_NAME $server_name;

    fastcgi_param HTTPS $https;

    # PHP only, required if PHP was built with –enable-force-cgi-redirect
    fastcgi_param REDIRECT_STATUS 200;

    fastcgi_pass unix:/var/run/php5-fpm.sock;
    }

    Forum: Plugins
    In reply to: Bulk WP Smush.it – help

    Now it goes for about 3-4 minutes, and I get a message from CloudFlare the site is offline. Got to check into that with Cloudflare.

    Thanks again, that looks like it resolved the Varnish timeout.

    Forum: Plugins
    In reply to: Bulk WP Smush.it – help

    That might have done it, I just changed it to 6000s (was not specified in the default.vlc I created) and kicked it off. So far it has been running for about 3 minutes, which is about 1 minute longer than it would run before.

    Thank you!

    Forum: Plugins
    In reply to: Bulk WP Smush.it – help

    I am running varnish on port 80.
    Nginx is running on 8080, but is not exposed to the Internet.

    It works, but only does some, then throws the error. If I keep doing it over and over, it would eventually finish all 2,000 images. (Probably only 25% of them are not smushed yet and some due to size).

    Thread Starter vampired

    (@vampired)

    Any ideas on this?

    It seems like only older posts have this problem, new uploads smush perfectly fine. I have confirmed the media exists and the path is in the same root folder of all the other ones.

    Forum: Plugins
    In reply to: Bulk WP Smush.it – help

    I’ve had this problem as well. Since I am running Varnish, I get a “guru meditation error”.

    I tried installing on Debian, but it will not install the opt-jpg opt-gif opt-png files no matter what I did. It doesn’t look like they exist anywhere on the system, even when installing the required packages.

    Forum: Plugins
    In reply to: W3 Total Cache & APC
    Thread Starter vampired

    (@vampired)

    I already verified Zend is not installed (I previously converted every Zend script to IonCube instead when I first installed APC).

    Any suggestions on this? It ran flawless previously.

Viewing 15 replies - 16 through 30 (of 36 total)