Varnish Cache can give unique pain. Here is Fix for getting rid of WordPress Login Error on Ubuntu Server running on Rackspace Cloud (PVHVM). For example, suddenly you can face either a white page (if no loadbalancer is in front) or load balancer served typical default Service Unavailable page from Rackspace load balancer. Even if it is a managed server, you might need to add some help to the human management for the WordPress part. Keep in mind – we are not using an ordinary shared server, so most of the things written on WordPress forum (deactivate Plugins, activate Default Theme etc.) will not work. Like a black magic, it might happen that, only within few hours, you are failing to login to WordPress via wp-login.php
page. We are providing some possibilities and how to solve them.
We Are Taking Some Points Granted For Fixing Varnish Cache and WordPress Login Errors (Ubuntu)
We are taking that, you have installed WordPress in this way – Install WordPress on Rackspace Cloud Server (Ubuntu 14.04 PVHVM). We are taking that you have used Advanced Tweaks and Optimization for Varnish Cache in our way. More things we are taking as granted :
- You are not running memcached (it is mem cash daemon – d is there, not the memcache) on different server or not running at all
- Your database server is different or you are using database as a service
- Your possibly used htaccess password to wp-login
- Ok, do not count this point for assessment, we are assuming that you are not using the extra managed level
If answers are mostly towards NO, then there is enough chance that you possibly got hacked. On a managed configuration, getting hacked means, you have done some major mistake.
---
Why the FCK Varnish Cache and WordPress Login Throw Such Errors…
It is Apache who rejects to allow to login! Apache is actually very hard web server software. Cache, Cookies are the reason! It is your browsers cache and cookies!
Fixing Varnish Cache and WordPress Login Errors (Ubuntu)
Obviously you will perform some routine checkups like logging to the device (your main web server) via SSH, checking Apache logs (usually there will be auth errors). Go to web folder or where your htaccess file is. If wp-login
page of wp-admin
is htaccess protected, uncomment the lines and save it. Do this from command line. Restart Apache, reboot.
Clear your browser cache, cookies, history etc. Restart the browser. Try to login. You should be able to login from at least Mac Safari. We have noticed this happens with Safari, Opera and Firefox on Mac and Linux. Disabling Varnish is rarely required, if you need :

1 2 3 | sub vcl_recv { # add this return(pass); |
Restart. Actually commenting out the line return(pass);
will make cache working again. This trick is for our way to tweak – Advanced Tweaks and Optimization for Varnish Cache.
As we are using Cloud based stuffs, all things take a bit time to really work. For example, if you change the port in load balancer, wait for 5-20 minutes instead of doing like mad. If you can login to shell, it is unlikely that you have been hacked. Do not look at abnormal errors like Database related errors.
After the login, obviously you should fix the possible problem and activate the htaccess protection. Actually, it happened with a visitors server around half an hour ago. I was able to login, so it was easy to solve…