[Resolved] WP Multisite 404 and Domain Mapping Issues

Status
Not open for further replies.
#1
Hi,
I'm fairly new to server administration and very new to Litespeed. I have had a WordPress multisite running on an Apache server since February and recently decided to move it to a managed Litespeed server. The multisite was running without issues on the old server. Since moving, I have encountered some new problems, notably with 404s appearing when subdomains are not forced to https. (The http version of each subdomain shows 404.) A possibly related problem is that external domains mapped to subdomains in the network are showing security errors because they are forced to https by the htaccess settings, and are therefore attempting to use the multisite's wildcard security certificate, which they are not configured to do. This is what results in the warning.

Nothing about this installation is any different from what it was on the previous server. I literally just copied it over and switched my DNS settings. I had to temporarily disable the caching plugin and a couple of others, but then it worked fine and I was able to restart those plugins, so the setup is exactly the same as it was on the previous server. I have not changed .htaccess or wp-config.php files in the slightest (except for the new database name and username).

Currently I have to force https in .htaccess because the http versions of the subdomains show 404 errors otherwise. My admittedly brief reading about Litespeed tells me that 404s will be shown when the server cannot find a matching virtual host, I presume referring to a subdomain that does not have its own domain entry in Cpanel, and when there is no 'catchall virtual host'. (I don't quite understand what that refers to.) I would love to know the best way to deal with this. Should I be creating domain entries for each individual subdomain? Is this a scalable solution?

Regarding the domain mapping issue, I am using the WordPress MU Domain Mapping plugin (https://wordpress.org/plugins/wordpress-mu-domain-mapping/) and not the WPMU-DEV domain mapping plugin. After receiving the security warning, I attempted to create an addon domain in my Cpanel account for the external domain that was being mapped. I added a Let's Encrypt cert to that domain. Now the https works fine, but I'm once again getting a 404, so adding that domain breaks the mapping.

I am committed to keeping the multisite on this Litespeed server because I think the performance is fantastic, and I need the DDoS protection the hosting provider is offering. I would therefore really like to find a way to deal with the http/404 and domain mapping issues. I would appreciate any advice.

Thanks--
WK
 

NiteWave

Administrator
#2
the standard way to trouble shoot a litespeed issue on a WHM/cPanel server:

switch to apache, see if the issue exists as well.
if exist, resolve it first. then switch back to litespeed, most likely the issue will be gone.
(if you've rebuilt php using easyapache, then before switch back to litespeed, do "Build Matching LSPhp")

if issue not exist on apache on the same server, then start to look into litespeed side.

litespeed read and parse apache's /usr/local/apache/conf/httpd.conf, so any configuration change will apply for litespeed in general.
plus php changes made by EasyApache.
 
#3
@NiteWave
I will try this shortly.
In the meantime, I set up another WP multisite installation on a different Litespeed server at the same hosting provider. I have several single-site WP sites running on that server with no problems. This is a completely vanilla multisite install, no plugins, no alterations to .htaccess beyond what WP says to do in the codex, default twentysixteen theme. I created three subdomains, and they are all returning 404 as well. Not just for the front end of the site, either, but also for the back end. It is possible to change their settings in the Network Site administrator, but it is not even possible to view the dashboards of the subdomains.

I have not had this issue before with settings up multisites on my old Apache/WHM/Cpanel server, nor on my local development server using MAMP. I can find very little information about it on Google, either. It seems very likely to me that this is a web server configuration issue. Where in my configuration should I be looking for the solution? Please keep in mind I am pretty new to all this, so a simple explanation would be appreciated.
Thanks
 

NiteWave

Administrator
#4
I managed blog site which is WP multisite installation without any problem.
can you provide the litespeed web admin ( :7080) and the backend of WP ?
I can take a look to see if can find anything.
 

NiteWave

Administrator
#6
the problem is in httpd.conf

for normal domain/sub domain, in <VirtualHost> section,
Code:
ServerName domain.com
ServerAlias www.domain.com
for wildcard subdomains, should configure as
Code:
ServerName domain.com
ServerAlias *.domain.com
 
Last edited by a moderator:
Status
Not open for further replies.
Top