Hello Everyone!
I am trying to understand how the Virtualhost system works. I think I have finally figured things out, but I have a question. Creating a virtualhost should be:
Listen 80
# This is the "main" server running on 172.20.30.40
ServerName server.example.com
DocumentRoot "/www/mainserver"
<VirtualHost 172.20.30.50>
DocumentRoot "/www/example1"
ServerName www.example.com
# Other directives here ...
</VirtualHost>
<VirtualHost 172.20.30.50>
DocumentRoot "/www/example2"
ServerName www.example.org
# Other directives here ...
</VirtualHost>
But I want to create virtualhost entries for separate apps such as Wordpress, Joomla, Prestashop, PhpBB and a few others. For the Document root folder I would like to do something like this:
# This is the "main" server running on 172.20.30.40
ServerName server.example.com
DocumentRoot "/www/mainserver"
<VirtualHost 172.20.30.50>
DocumentRoot "/hotdocs/Wordpress"
ServerName wordpress1.localhost
<VirtualHost 172.20.30.50>
DocumentRoot "/hotdocs/Joomla"
ServerName Joomla1.localhost
I realize that I should include the Directory location but I need to know if I'm on the right track. If not, can someone please point me in the right direction? I looked just about everywhere on the internet, but I can't find the answer I am looking for. Before I start creating virtualhost entries I want to make sure that I'm not headed for a virtualhost nightmare. Thanks!
Regards,
misstheresa2009