Litespeed (OLS) phpmyadmin access - Error 404 after installing SSL..?

October 11, 2019 87 views
One-Click Install Apps Getting Started Control Panels Configuration Management System Tools

Aaargh! Just lost an entire post during login - please fix your sessions, DO!</rant>

I have an Ubuntu 18.04, Wordpress, MySQL, Litespeed OLS installation and had access to my phpmyadmin via the IP address. I installed the SSL and got that setup and running and now I can’t figure out how to configure OLS to access my phpmyadmin.

I’ve tried putting a static context on the OLS VH to redirect */phpmyadmin/ to the phpmyadmin directory on the server, but I just get the Wordpress 404 error.

Obviously I’m missing something, but I don’t know what.

Any ideas? I’m new to Litespeed server (pls note: NOT using Apache or Nginx, and articles describing how to configure them haven’t been helpful).

Thanks in advance for your help with this!

Regards, Justin

5 Answers

Hey Justin,

I understand your frustration but (I may be wrong) whoever signs a SSL cert signs it for the requested domain… not the IP address. Please try it with the domain for the droplet.

I hope this helps,
Bud Manz

  • Yes, thanks, I’m aware of that and I have been trying it with the domain:

    https://photos.mencher.net/

    with the /phpmyadmin/ suffix. What I’m asking is how to configure the Litespeed server correctly to access the phpmyadmin directory on my server (which was placed outside the server route by the default installation).

    Do I need to set up a separate VH or can I use the existing one with a (correctly set) static context? Do I need to make adjustments to the htaccess file? Do I need to set up a new Listener?

    None of the set up guides seem to address this particular configuration, which is odd since it’s a one-click download here at DO.

    edited by MattIPv4

Hi @digitalocean1918664677468e,

LiteSpeed does provide an wordpress+openlitespeed+MariaDB+CertBot+phpmyadmin solution image on Marketplace.

So you can just launch and play with it in few minutes.

If you want to manually setup a phpmyadmin context, please see example settings below:

  • URl: /phpmyadmin/
  • Location: YOUR_PHPMYADMIN_PATH
  • Accessible: Yes
  • Index Files: index.php
  • Access Allowed: *
  • Enable Rewrite: No
  • Rewrite Inherit: No

Best,
Eric

  • THanks, Eric. That configuration isn’t working for me. I had the first 3 settings OK, and didn’t know I needed to configure the last 4, which are now configured as you suggest - but it still doesn’t work.

    However, before changed the settings I was getting the Wordpress 404 page, and now I’m getting the Litespeed 404 page. Does that say anything helpful to you?

    BTW, the site is up and running at https://photos.mencher.net/ so I don’t need/ want to install any more images. The image I got uses MySQL not Maria DB, although I suppose that wouldn’t matter in this case.

    Thanks again for your help.

Hi,

Do you mean issue now is visiting phpmyadmin and return a 404 page?

It maybe faster to help you with the issue on LiteSpeed Community on Slack

You can direct message me @eric, or just post your question in random channel.

Best,
Eric

OK, Eric helped me with the solution - many thanks for your time and attention, Eric!

We’re in Litespeed Server Admin:
Virtual Host > Context > Static

It seems that the URI and the Location don’t quite work the way the tooltips imply - which is that <Location> is appended to the <URI>.

In fact, the Location (which is the directory you’re mapping to) needs to include the directory name itself (not just the path to the directory it’s in).

Example:
URI: /phpmyadmin/

–> this is what’s appended to your VH domain, i.e. what the user accesses: https://www.domain.com/phpmyadmin/

Location /var/www/phpmyadmin/
–> NOT /var/www/

(These are default locations for the DO image I downloaded, YMMV).

Summary: tooltips need updating, plus a How-to maybe?! Thanks!

Have another answer? Share your knowledge.