Topic on Project:Support desk

How to change Apache2 virtual hosting directory

7
Timingliu (talkcontribs)

I have installed the updated version of mediawiki on a new directory and now it can be accessed via test-update.clinicianwiki.com. The original site is clinicianwiki.com. I tried to change the directory in the /etc/apache2/sites-avaiable/*.conf files to the directory hosting test-update.clinicianwiki.com and then use a2ensite but it is not working (despite changes being brought forward to sites-enabled. Now I have to do it in a very clumsy way by changing the $wgServer in the LocalSetting.php of clinicianwiki.com so that it will be redirected to test-update.clinicianwiki.com where new features are available. What should I do so that clinicianwiki.com will be serving the same content as test-update.clinicianwiki.com? (it is not necessary that the same directory is served twice, on clinicianwiki.com alone will do but I can't figure out a way to do it...). Thanks!

MarkAHershberger (talkcontribs)

I'm confused by your question. Do you want the test site and the original site to work at the same time but have different data? Are you trying to move the test site to the original site?

Timingliu (talkcontribs)

I am trying to move the test site to the original site by changing the apache2 and mediawiki settings.

Bawolff (talkcontribs)

do you need to restart apache? Not working how?

Timingliu (talkcontribs)

thanks a lot for your prompt response!

I restarted apache2. not working as in when you now go to clinicianwiki.com, it will first go to the old directory, where the LocalSetting.php will then redirect you to test-update.clinicianwiki.com.

Bawolff (talkcontribs)

How do you know its going to the old directory?


Is $wgServer set correctly in the LocalSettings.php of the new LocalSettings.php

Timingliu (talkcontribs)

Thanks so much! I double checked again and it was because using SSL encryption with CertBot added a *-le-ssl.conf file and I needed to modify and a2ensite and restart apache2 for changes to take effect.

Reply to "How to change Apache2 virtual hosting directory"