VirtualMin + WordPress Multiple Domain, same site, same ip

I’m running a website and for a couple months I’ll have to disable my primary domain. Right now I’m running this website in CentOS 7.3 Webmin 1.840 and with Let’s Encrypt Certificate.

I need to make this website available to other domain in real-time, and at the same time, disable my primary one. Something like this: (disabled for a while, but providing real-time data to secondary domain) (all data from being shown here, just like proxy/domain alias, with all redirects, links, images… set to

I’ve already setup Cloudflare for the only with A type (IP) and as soon as I type in the web browser, it get’s redirected to

I’ve tried to create virtual server in all modes in Virtualmin: Top-level server, Sub-server and Alias of (with/without own email), but the maximum I could achieve was when I browse, it shows homepage, but ALL LINKS it’s still linked to So I can’t click anywhere.

Besides that, all traffic should be in SSL (https), so my htaccess of primary domain is set to:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$$1 [R,L]

By the way, the secondarydomain CAN (and probably SHOULD) share the same vhost folder, so:


Should be equal for both.

Could someone help me achieve this?
Btw, my english is rusty and probably I’ve made lots of english mistakes above :P.

Read more here: VirtualMin + WordPress Multiple Domain, same site, same ip

Leave a Reply

Your email address will not be published. Required fields are marked *