Custom login not working
-
Hi,
I have a custom login page, and it doesn’t redirect the use when filled. I read in the documentation that I need to add a URI to exclude the cache. I added both:
dashboard-page/
dashboard-page
dashboard-page*
dashboard*And nothing works. What else can I do?
The page I need help with: [log in to see the link]
-
You need to inter the URL under the
Prevent the following URIs to be cached
section like this:/dashboard-page/
Screenshot: https://i.imgur.com/3TMWRKY.png
If you want to bypass any page that was the work test anywhere in the URL (including the query params) then you will do:
*test*
If you want to bypass a page whose URL starts with
test-me
for example/test-me-something/
then you will do:/test-me*
Also looking at the response header of your website it seems:
1. the plugin is disabled in your site
2. There is no cache-control headerScreenshot: https://i.imgur.com/0Pb8eLC.png
As I can see you are using a WordOps server, have you added the Nginx rules generated by the plugin inside
/wp-content/wp-cloudflare-super-page-cache/<your-domain>/nginx.conf
file?Try adding those nginx rules in your main nginx.conf file. If that doesn’t work, enable the option “overwrite cache control headewr” and then again look inside the nginx file created by the plugin and put it in your main nginx.conf file and the restart nginx.
Thanks for the reply.
I set up the URI as you mentioned: https://i.imgur.com/k0IShxo.png
The only thing I did is adding:
location ~* \.(xml|xsl)$ { add_header Cache-Control "no-cache, no-store, must-revalidate, max-age=0"; expires -1; } location /robots.txt { add_header Cache-Control "no-cache, no-store, must-revalidate, max-age=0"; expires -1; } location /wp-cron.php { add_header Cache-Control "no-cache, no-store, must-revalidate, max-age=0"; expires -1; } location = /wp-content/wp-cloudflare-super-page-cache/mydomain.com/debug.log { access_log off; deny all; }
To:
/etc/nginx/common/locations-wo.conf
Is that what you mean?
-
This reply was modified 3 years, 8 months ago by
alegoffa.
I think so, I don’t know what’s the file name of your nginx.conf there. But if that is it then yes. Also I said this above:
If that doesn’t work, enable the option “overwrite cache-control header” and then again look inside the nginx file created by the plugin and put it in your main nginx.conf file and the restart nginx.
After enabling that option I don’t see any different inside
/wp-content/wp-cloudflare-super-page-cache/<your-domain>/nginx.conf
Do I need to follow the instructions found inside the plugin? ↓
Edit the main Nginx configuration file, usually /etc/nginx.conf, and enter these rules immediately after opening the http block: map $upstream_http_x_wp_cf_super_cache_active $wp_cf_super_cache_active { default 'no-cache, no-store, must-revalidate, max-age=0'; '1' 's-maxage=31536000, max-age=60'; } Now open the configuration file of your domain and add the following rules inside the block that deals with the management of PHP pages: more_clear_headers 'Pragma'; more_clear_headers 'Expires'; more_clear_headers 'Cache-Control'; add_header Cache-Control $wp_cf_super_cache_active; Save and restart Nginx.
When referrincing the “configuration file of your domain” do they mean this one: /wp-content/wp-cloudflare-super-page-cache/<your-domain>/nginx.con or the nginx config file?
-
This reply was modified 3 years, 8 months ago by
alegoffa.
yes follow the instructiuons.
Sorry, but I’m lost in the second part, it says to add the “following rules inside the block that deals with the management of PHP pages”.
Here’s what’s inside of my config file located at: /var/www/mydomain.com/htdocs/wp-content/wp-cloudflare-super-page-cache/mydomain.com/nginx.conf:
location ~* \.(xml|xsl)$ { add_header Cache-Control "no-cache, no-store, must-revalidate, max-age=0"; expires -1; } location /robots.txt { add_header Cache-Control "no-cache, no-store, must-revalidate, max-age=0"; expires -1; } location /wp-cron.php { add_header Cache-Control "no-cache, no-store, must-revalidate, max-age=0"; expires -1; } location = /wp-content/wp-cloudflare-super-page-cache/learn.keyspanish.com/debug.log { access_log off; deny all; }
Can you tell me exactly where those rules go? Am I on the right file?
The closest thing I found is this on my
/etc/nginx/nginx.conf
# Common security headers
more_set_headers “X-Frame-Options : SAMEORIGIN”;
more_set_headers “X-Xss-Protection : 1; mode=block”;
more_set_headers “X-Content-Type-Options : nosniff”;
more_set_headers “Referrer-Policy : no-referrer, strict-origin-when-cross-origin”;
more_set_headers “X-Download-Options : noopen”;It seems WordOps puts the locations in a different file.
Put all the rules in your main nginx.conf file. Which it seems to be
/etc/nginx/nginx.conf
for your case.-
This reply was modified 3 years, 8 months ago by
iSaumya.
I put everything there, as you suggested, and it doesn’t work. This is how the config file looks like now: https://i.imgur.com/lztUIrV.png
I’m confused by the documentation:
Now open the configuration file of your domain
What file is this referring to, exactly?
inside the block that deals with the management of PHP pages
What and where is that block?
You should really ask the wordops community about where/how to edit the nginx.conf file. As I still don’t see cache control header in your site. This is a server configuration thing which I won’t be able to help with as each system works differently.
-
This reply was modified 3 years, 8 months ago by
- The topic ‘Custom login not working’ is closed to new replies.