[solved] cPanel Passthru and PHPMyAdmin in Litespeed

craigles

Active Member
#1
Hi Everyone,

Was just wondering if anybody has come across the situation and knows how to fix it up.

Have a user logging into cPanel interface by going to domainname.com/cpanel which of cause get's rewritten by a rewrite rule to go to 127.0.0.1 on the required port.

Seems when this user tries to use PHPMyAdmin via this way - they get this error from PHPMyAdmin.

The $cfg['PmaAbsoluteUri'] directive MUST be set in your configuration file!

I'm assuming something isn't enabled in Litespeed or being passed through - however I have no clue what that is.

Has anybody else had this problem and overcome it?

Cheers,
Craig
 
Last edited by a moderator:

craigles

Active Member
#2
OK, It seems to be related to the $_SERVER PHP superglobal.

Doing a print_r($_SERVER) going via the cpanel web server, and using the passthru presents a difference.

The HTTP_HOST entry is empty on the passthru and is populated on the cpanel web server method.

The SERVER_NAME var is also empty as opposed to the cpanel web server access method.
 

craigles

Active Member
#3
And the problem has been located.
Apologies for creating an empty forum post, even if it did help me find out the issue.

We have varnish installed in front of the Litespeed web server, and it seems varnish is responsible for stripping away those 2 variable entries which phpMyAdmin requires to make it all work properly.

Cheers.
 

NiteWave

Administrator
#4
Thanks for sharing. with 2-CPU license lsws, you may not need varnish -- to use litespeed page cache instead.
 
Last edited:
Top