Support » Plugin: Nginx Helper » Domain Mapping Nginx fcgi_cache_purge = no cache purge on mapped sites

  • Resolved TheInfinity


    Hi, everyone,

    thanks for you great plugin. It works great – except one thing: domain mapping + cache purge does not work here.

    What works:
    – cache purging on main site
    – cache purging on all subdomains of main site

    What does not work:
    – cache purging on all domain mapped sites

    Nginx has the nginx-cache-purge module enabled:

    # nginx -V
    nginx version: nginx/1.1.19
    TLS SNI support enabled
    configure arguments: --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/ --with-http_ssl_module --without-mail_pop3_module --without-mail_smtp_module --without-mail_imap_module --without-http_uwsgi_module --without-http_scgi_module --with-ipv6 --add-module=/build/buildd/nginx-1.1.19/debian/modules/nginx-upstream-fair --add-module=/build/buildd/nginx-1.1.19/debian/modules/nginx-cache-purge --add-module=/build/buildd/nginx-1.1.19/debian/modules/naxsi/naxsi_src

    Fcgi caching is defined this way in http block:

    fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:256m max_size=512m inactive=60m;
    fastcgi_cache_key "$scheme$request_method$host$request_uri";
    fastcgi_cache_use_stale error timeout invalid_header http_500;

    In server block I use fcgi caching for php files, /cache/ is also defined:

    location ~ \.php$ {
            location ~ /wp-(admin|login) {
                    return 301 https://$host$request_uri;
            try_files $uri = 404;
            fastcgi_index index.php;
            fastcgi_pass unix:/var/run/php5-wordpress.sock;
            include fastcgi_params;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param SCRIPT_NAME $fastcgi_script_name;
            fastcgi_cache_bypass $skip_cache;
            fastcgi_no_cache $skip_cache;
            fastcgi_cache WORDPRESS;
            fastcgi_cache_valid 60m;
    location ~ /purge(/.*) {
            fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";

    So … what to do? Thanks for any help!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Domain Mapping Nginx fcgi_cache_purge = no cache purge on mapped sites’ is closed to new replies.