Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
1.6k views
by Rookie
Hi ! We have an issue with a plugin that has a login page (on the url https://ourwebsite.fr/connexion).
Login don't work after a while, because of the Nginx cache. When we do a "full purge" of the cache by the Nginx helper plugin in our wordpress, everything is OK, but the problem is coming back again and again few hours after...
Could you please tell us how to bypass or deactivates the nginx cache for a specific website, and the specific login page : https://ourwebsite.fr/connexion ?

We triend to find how to do, but no luck... So we prefer ask the question to the webinoly specialist :)

Thanks for your help!!

Regards
by Rookie
Hi! If I understand you correctly, did you install the Nginx Helper Wordpress plugin for Webinoly? The fact is that it does not work for my site. In addition, this problem was discussed here and there is still no single solution. Does Nginx Helper work correctly for your site?
by Expert

Just for the record:

Webinoly now have a native function to exclude URL's from cache.

https://webinoly.com/en/documentation/webinolys/#exclude

2 Answers

0 votes
by Rookie
Just to add, we added on the custom rules of our website these lines :

if ($request_uri ~* "/connexion/|/password-recover/|/password-reset/") {         
set $skip_cache 1;
}

if ($http_cookie ~* " comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
set $skip_cache 1;
}

our connexion page is on /connexion/ and others are for lost password and reset.

Could you confirm that it's OK like that on webinoly / nginx ?

Thanks :)
by Expert

Just be careful of not having duplicate Nginx rules, check: /etc/nginx/common/wpfc.conf

0 votes
by Rookie
Hi,
So we continue to have the login issue on our website with the cache.
We need to do a cache purge (by the webinoly command) each morning, in order to let our users login on the website.
We tried many rules already, to don't cache our login page (that is https://xxxx.com/connexion/), but nothing is working..

We have :
 

if ($request_uri ~* "/connexion/|/password-recover/|/password-reset/") {

set $skip_cache 1;

set $skip_reason "${skip_reason}-URI";

}

location ~ \.php$ {

        try_files $uri =404;

        # add cache status

        add_header WP-Bullet-Fastcgi-Cache $upstream_cache_status;

        # add the cache skip reason if relevant

        add_header WP-Bullet-Skip $skip_reason;

        include fastcgi_params;

        fastcgi_pass unix:/run/php/php7.3-fpm.sock;

        fastcgi_split_path_info ^(.+\.php)(.*)$;

        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

        fastcgi_cache_bypass $http_secret_header $skip_cache;

        fastcgi_no_cache $skip_cache;

        fastcgi_cache WORDPRESS;

        fastcgi_cache_valid 404      1m;

        fastcgi_cache_valid  60m;

}
by Expert
Did you see the file I mentioned in my previous comment?
The solution for your problem is there.
Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...