Question

litespeed wordpress domain

Posted May 3, 2021 391 views
OpenLiteSpeed WordPress 1-Click

I have a question regarding the openlitespeed wordpress droplet. I am planning to use it for an api. ie: https://api.mysite.com

I got this far:

  • I setup the subdomain that routes to my droplet – the dns is outside of DO, so I have an A-record pointing to the droplet’s IP.
  • The subdomain is setup within the DO dashboard.
  • I setup listeners and vhosts inside ols admin.
  • The certbot –webroot verification went through using the subdomain

BUT

When I visit the subdomain in the browser, the website is displayed but not under the desired url. Instead, it is forwarded to the naked IP address at which point the installed certificate fails. The cert is issued for the subdomain and not the ip address.

How can I keep the subdomain in the url bar?

Thank You

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Ooops! The wordpress install had the raw ip set in the sitehome and siteurl fields. Everything was working as intended but wordpress was redirecting back to the ip.

  • Yes, it will use server IP by default. If you set up the domain with the prompt script, it will auto add the domain on the server for you.

    • That makes sense. This was not an option for me because the setup script only works with a root domain. I was only using a subdomain in this case.

      Thanks for your help.

You probably haven’t mapped the api virtual hosts + domain to the listener.

https://docs.litespeedtech.com/cloud/images/wordpress/#step-2-add-domain-to-listener

Let us know if it works or not.

Best,
Eric