mferguson
By:
mferguson

How do I mask a domain powered by Wordpress Multisite?

May 22, 2015 2k views
Apache WordPress LAMP Stack DNS CentOS

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.

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

Have another answer? Share your knowledge.