Mirror a Composr site on a different server
Posted
#4666
(In Topic #942)
ideas on how to make this happen
Hello,I am thinking of creating a "mirror" of my website onto a different server mainly as a backup but also incase of earthquake problems of Japan.
Mirror site - Wikipedia
There is no noted system or method it seems.
Has anyone done this? Suggestions? Ideas?
My goal is to mirror my composr website to a remote server.
Posted
I have not read through it though, but I hope it helps, in someway.
Posted
Posted
i have this working now using the "rsync", so it copies everything over but NOT the _config.php as it needs to have the proper base URL and not the cache folders. I then copy over the database as well.
I realized my mirror site was automatically using the full mirror URL (mirror.example.com) as the canonical link so I used this as a fix:
in your main site header template change the canonical link to:
<link rel="canonical" href="https://composr.app/forum/topicview/browse/general-chat-2/mirror-composr-site.htm" />
so on the main site it does not find the subdomain "mirror" so all is good, but on the mirror site, it strips out the subdomain "mirror"
now hopefully search engines will realize my main site is my HQ and the mirror is not.
Posted
As a note, usually during development I'll write code in _config.php to put out different settings based on hostname, like:
Code
switch (gethostname()) {
case 'some-host':
break;
case 'some-other-host':
break;
}
0 guests and 0 members have recently viewed this.