404 error when protecting phpmyadmin

#1
I followed https://docs.litespeedtech.com/cloud/images/wordpress/#how-do-i-secure-phpmyadmin except the IP allow method. Yes, I know it's LiteSpeed documentación and not OpenLiteSpeed. I do have OpenLiteSpeed installed on Ubuntu 22.04 via Vultr.com marketplace.

When I access https://mydomain.com/secreturi I do get asked the user and password (Method 3: Require password, Realm configured). This works as expected.

But then, after entering the user + password, I get a blank page when trying to access the actual phpmyadmin secreturi (Method 1. Change your phpMyAdmin URL ).

Upon inspection of Developers console in Chrome, I can see that all resources are 404 no found.

Directories are correctly configured in OLS Web server (Virtual Host/Context and Realm)

Moreover, if I try to restart phpmyadmin with
killall -9 lsphp
I get
lsphp: no process found

However, phpMyAdmin is located at /var/www/phpmyadmin (default install).

Even if I reboot the server, still 404 for phpmyadmin resources.

This was working before. I may have done some apt update && upgrade on the server. I haven't added any plugins since then.

Thanks,
 

Cold-Egg

Administrator
#2
The link you followed is correct. Could you go to the web admin > virtual host > phpmyadmin context and double-confirm all the settings are correct?
 
#3
I do have on the server -->Virtual Host--> MyVirtualHost--> Context
URI: /mysecreturi
Location: /var/www/phpmyadmin
Accessible: Yes
Realm: mysecretrealm

And, under Virtual Host-->MyVirtualHost-->Security
Realm name: mysecretrealm
User DB Location: /usr/local/lsws/conf/PASS

As mentioned, the Realm works as expected, it asks for user and password and accepts them as configured.

But then, when transferring to the actual phpmyadmin login screen, it shows a blank page and, upon inspection of Developer console in Chrome, I can see all resources for phpmyadmin are 404 not found.

However, phpmyadmin is indeed installed at /var/www/phpmyadmin.

Yet again, if I do a killall -9 lsphp I get lsphp: no process found. If I reboot the server, problem continues.

CURRENT VERSION:OpenLiteSpeed 1.7.17
 

Cold-Egg

Administrator
#4
Hi,
Ok, so the context config looks fine. What if you remove the realm temporarily in order to make sure the phpmyadmin loads fine with PHP?
 
#5
  • I did that before. But doing it again, I remove Realm from Virtual Host -- Security --> Save --> Graceful restart.
  • Then I check phpmyadmin secreturi and the Real is gone in the configuration. By the way, I also did before returning /phpmyadmin as the URI, instead of using /myscecreturi.
  • I do $ sudo killall -9 lsphp and I don't get an error. Next terminal prompt shows $.
  • I try to access mydomain.com/mysecreturi and I do still get a blank page and, inspecting developer's tools in chrome,
    • Failed to load resource: the server responded with a status of 404 () for all resources.
    • By the way, I'm using a New incognito window in the browser, so cookies are not the problem.
  • By the way, I'm using Cloudflare, but there are no Page rule or WAF rule denying access to phpmyadmin.
  • In WordPress I'm using Crowdsec and BBQ Firewall (by Jeff Starr). Even If I deactivate the plugins in WordPress, the problem persists.
 
Last edited:
Top