OLS with wordpress standard install phpmyadmin stopped working

#1
I have a standard installation of OLS on AWS following the guide: https://docs.litespeedtech.com/shar...pgrade-openlitespeed-to-latest-stable-version

The standard config comes bundled with phpmyadmin configure to be served through a context.
It used to work fine.

Now, after couple of months I wanted to do some db operations and the phpmyadmin page is blank.

I am running php8.1.
To be precise: the document loads, all files except for .js and .css load fine, but javascript and css are 404.

The pma is under /var/www/phpmyadmin, as in the original installation. All the files in the correct path are there.
Virtual host root is /var/www/html
I don't have any external caching enabled (like cloudflare).

I have been working on this for hours, tried everything I can think of. Some things I have tried:
- all user-side things: cleared caches/cookies, incognito mode, different browsers. Access through IP and through the domain. Curl one js file, etc
- move the phpmyadmin context URI to something different (/securepma)
- moving the pma context to different order
- reinstalled pma directory on the server with new version - (I currently have pma 5.2.1, tried with the rc-6, cause I thought maybe there is a problem with php8, but the version 6 requires php8.2)
- tried changing the permissions of the files, the workers are running under www-data user, and that's the owner of all files under the pma directory
- tried disabling the rewrite rules in the virtualhost in the `/` context. Tried removing the .htaccess under the /var/www/html
- when enabling logging I can see the .htaccess being loaded, and the pma js/css being processed but only the http->https rule is matched to them...
- went through all the options in the ols panel but don't see anything offensive.

I am, obviously, not an expert in this. Please help me. How do I debug this?

It seems something, somewhere is matching the js/css to some rule and trying to do something funny with them...
 
#3
Thank you @Cold-Egg! I have sent you all the info. And I am posting redacted vh config here:


Code:
cat /usr/local/lsws/conf/vhosts/wordpress/vhconf.conf
docRoot                   /var/www/html/

errorlog $SERVER_ROOT/logs/kuba-vhlogs.log {
  useServer               0
  logLevel                INFO
  rollingSize             10M
  keepDays                1
}

accesslog $SERVER_ROOT/logs/kuba-access.log {
  useServer               0
  keepDays                1
}

index  {
  useServer               0
  indexFiles              index.php index.html
}

context /securepma/ {
  location                /var/www/phpmyadmin/
  allowBrowse             1
  indexFiles              index.php

  accessControl  {
    allow                 *
  }

  rewrite  {
    enable                1
    inherit               1

  }
  addDefaultCharset       off

  phpIniOverride  {

  }
}

context exp:^.*(woff|woff2|jpg|jpeg|png|css|js)$ {
  location                $DOC_ROOT/$0
  allowBrowse             1
  note                    https://openlitespeed.org/kb/how-to-set-up-custom-headers/
  enableExpires           1
  expiresByType           application/javascript=A15552000, text/css=A15552000
  extraHeaders            <<<END_extraHeaders
unset Cache-control
set Cache-control public, max-age=15552000
  END_extraHeaders


  addDefaultCharset       off
}

context / {
  allowBrowse             1

  rewrite  {
    enable                1
/var/www/html/.htaccess
  }
  addDefaultCharset       off
}

rewrite  {
  enable                  1
  autoLoadHtaccess        1
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://<url>/$1 [R,L]
}

vhssl  {
  keyFile                 /etc/letsencrypt/live/<url>/privkey.pem
  certFile                /etc/letsencrypt/live/<url>/fullchain.pem
  certChain               1
}
 

Cold-Egg

Administrator
#4
Please try to disable the "context exp:^.*" and see if it helps. Since OLS has browser cache enabled by default, you don't need to add that context.
 
#5
<facepalm> it works!
Thank you @Cold-Egg.

I actually tried this, by moving that context to the lowest priority. I though OLS would match the first context and then stop processing. Apparently it processes all context for all requests?
 
Top