Question

How do I mask a domain powered by Wordpress Multisite?

Posted May 22, 2015 3.6k views
CentOSApacheWordPressLAMP StackDNS

Hi, I’m running a Wordpress multisite instance on a Cent OS box. I’m having a problem figuring out how to mask the intended domain.

Here’s what I’m trying to do:

  • domain2.com actually points to domain1.com/wordpress2
  • domain3.com actually points to domain1.com/wordpress3
  • domain4.com actually points to domain1.com/wordpress4
  • and so forth and so on

Specs:

  • Cent OS 7 (LAMP)
  • domain1.com and domain2.com point to digitalocean’s nameservers

domain1.com’s conf

<VirtualHost *:80>
        ServerAdmin admin@domain1.com
        ServerName www.domain1.com
        ServerAlias domain1.com
        DocumentRoot /var/www/html
        ErrorLog /var/log/httpd/error.log
        CustomLog /var/log/httpd/access.log combined
        <Directory "/var/www/html">
                AllowOverride All
                Require all granted
        </Directory>
</VirtualHost>

domain2.com’s conf

<VirtualHost *:80>
        ServerAdmin admin@domain1.com
        ServerName www.domain2.com
        ServerAlias domain2.com
        DocumentRoot /var/www/html
        ErrorLog /var/log/httpd/domain2.com-error.log
        CustomLog /var/log/httpd/domain2.com-access.log combined

        <Location "/">
                ProxyPass  "http://domain1.com/wordpress2"
                ProxyPassReverse "http://domain1.com/wordpress2"
        </Location>
</VirtualHost>

The result is domain2.com will redirect to domain1.com/wordpress2, but the domain isn’t masked. Thank you for any guidance.

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.

×
3 answers

There are a few approaches, but one way to do it, if you don’t mind editing your database a little. Here is a tutorial:

https://ghettocottage.com/blog/adventures-with-wordpress-multiple-domains/

https://ghettocottage.com/blog/adventures-with-wordpress-multiple-domains/

This above website is not available.

Diese Website ist nicht erreichbar

Verbindung wurde zurückgesetzt.
Versuchen Sie Folgendes:
Verbindung prüfen
Proxy und Firewall prüfen
Windows-Netzwerkdiagnose ausführen
ERRCONNECTIONRESET

Submit an Answer