You are here
Kelly Wagner - Tue, 2018/03/06 - 01:08
Discovered the Wordpress Turnkey Appliance and love it! Was setting up some IP based virtual servers, and no matter what, when using the FQDN it automaticaly directs the clients to the /var/www/wordpress directory.
Is there something baked in the image that would cause this?
Forum:
Have you updated the Apache config?
TBH, I'm unfamiliar with WordPress multi-site hosting, but I see no reason why it shouldn't work.
My guess is that it's the default Apache config. As you can see the default config explicitly points all incoming traffic to /var/www/wordpress.
If you want to use Apache to direct incoming traffic to different places, then I suggest that you remove the 'ServerName' directive from the top of that file (/etc/apache2/sites-available/wordpress.conf), then within the 'VirtualHost' section add a new 'ServerName' entry there, with the domain you want to server the existing WordPress from. You'll want to do that for both port 80 and 443 (http & https). So assuming a domain of "www.example.com", your resulting wordpress.conf would look like this:
To add an additional site (let's say www.example.net) which points to a doc root of /var/www/new-site, I'd just copy the existing virtualhost and edit it accordingly. I.e.: Then edit that and swap all instances of '/var/www/wordpress' to '/var/www/new-site' and instances of 'www.example.com' to 'www.example.net'. Here's how I'd do it (manually doing it is fine, I'm just showing off my ninja commandline skills! :) Obviously in your context, you'd want to adjust the things to substitute, i.e. paths and domain name.Then you just need to restart Apache:
And you should be good to go! :)Bada-Bing! Thank you, it
Bada-Bing! Thank you, it works.
Fantastic! :)
Add new comment