Why has multisite/network become so strange?
-
I cannot find ANY reliable information after reading many articles, including by WP itself on how to set up a network. I believe the problem is in the httpd.conf only but cannot find much about that aspect of setting up the network.
I have an older install that is using the wordpress-mu-domain-mapping plugin that works perfectly but this new method with multisite built in simply won’t work.
I’ve installed the latest wordpress then as per documentation on the wordpress site, I converted the new site into a network one.
-I disabled the two plugins that come with a fresh install.
-I set pretty permalinks.
-I then added the following line into the wp-config.php file.
define( ‘WP_ALLOW_MULTISITE’, true );
-I then logged out, back in and went to the new network option in settings.
-I enabled the multi-domain option rather than the multi-directory one.
The site then gives the code that should be replaced in the .htaccess and added into the wo-config.php file.
define( ‘MULTISITE’, true );
define( ‘SUBDOMAIN_INSTALL’, true );
define( ‘DOMAIN_CURRENT_SITE’, ‘www.domain.com’ );
define( ‘PATH_CURRENT_SITE’, ‘/’ );
define( ‘SITE_ID_CURRENT_SITE’, 1 );
define( ‘BLOG_ID_CURRENT_SITE’, 1 );Never, anywhere is it mentioned if I need to keep that first line in there or not. However, it seems this has to be kept.
define( ‘WP_ALLOW_MULTISITE’, true );
I then go to the new Network admin section and add a domain.
DNS, Apache, all is fine, no issues there at all.
From this point on, no matter what I do, the new domain is never found. I can see this in the web logs.
[21/Feb/2022:16:27:14 -0700] “GET /wp-signup.php?new=www.newdomain.com HTTP/2.0” 200 6159 71466 71040 “-” “Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0”
Trying to get to the new domain always leads to the main sites sign up page. There are no errors, nothing what so ever to give me any clue of why this is not working. I have read two dozen installation articles and most of them have variations of course including using the wrong directives and combinations.
I found one mention about redirection going to the sign up page but that’s not my problem in this case. The problem is that trying to visit the newly added domain never reaches it, it only reaches the main site yet I can see the log attempt.
For what it’s worth, the server is Centos-8 running Apache 2.4, php 7.4 with letsencrypt SSL certs.
I can see the hits coming into the server and getting to httpd.
https://www.new-domain.com x.x.x.x – – [22/Feb/2022:15:14:31 -0700] “GET / HTTP/2.0” 200 9394 338870 338018 “-” “Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0”
https://www.new-domain.com x.x.x.x – – [22/Feb/2022:15:14:32 -0700] “GET / HTTP/1.1” 200 8723 152184 151703 “https://www.new-domain.com/” “WordPress/5.9; https://www.new-domain.com”I can see it hitting the server in the web log but it always ends up on the main site. https://www.main-domain.com/wp-signup.php?new=www.new-site.com
I’m not using the subdirectory method, I’m using the multi-domain method. I have the full FQDN set in the Sites/Settings and yes, I edited the info after creating it using the newdomain.existing-domain.com way.
What in the world am I missing to make this work?
This is how my httpd.conf looks;
<VirtualHost *:443>
ServerName https://www.main-domain.com
ServerAlias main-domain.com
DocumentRoot /var/www/html
DirectoryIndex index.php<Directory /var/www/html>
AllowOverride all
</Directory>SSLEngine on
# Maintained in ssl.conf
#Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/main-domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/main-domain.com/privkey.pem
</VirtualHost>###
<VirtualHost *:80>
ServerName https://www.new-domain.com
ServerAlias new-domain.com
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.new-domain.com [OR]
RewriteCond %{SERVER_NAME} =new-domain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName https://www.new-domain.com
ServerAlias new-domain.com
DocumentRoot /var/www/htmlSSLEngine on
# Maintained in ssl.conf
#Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/new-domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/new-domain.com/privkey.pem
</VirtualHost>###
- The topic ‘Why has multisite/network become so strange?’ is closed to new replies.