LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Setting up virtual hosts in Apache using Webmin (https://www.linuxquestions.org/questions/linux-software-2/setting-up-virtual-hosts-in-apache-using-webmin-96853/)

Spudley 09-25-2003 03:35 PM

Setting up virtual hosts in Apache using Webmin
 
Hi folks,

Can anyone help me with configuring Apache virtual servers using Webmin?

Although the Webmin config page for virtual servers looks fairly straightforward, no matter what I try, I haven't been able to get my virtual servers to work.

I've set them all up to point to different directories, but they don't want to work - the best I've managed was to get them to display the server's main default page, after I entered the names into the hostnames list.

What do I need to do to get each virtual server correctly pointing to it's own directory? Is there anything obvious I'm likely to have missed? Please help!

Ps - I'm learning quickly, but I'm still a bit of a newbie, especially with configuring Apache, so please be gentle! *grin*

PPs - You probably want to know that I'm running SuSE 8.1, Webmin 1.110, and Apache 1.3.26.

Thanks. :)

cli_man 09-25-2003 08:31 PM

In apache I would just edit the config file. You can just click on the edit config files in the apache part of webmin, scroll down to the bottom of the httpd.conf file there and put in something like this:

<VirtualHost 192.168.1.22>
DocumentRoot /home/web/sites/website_one
ServerName www.website_one.com
ServerAlias website_one.com
</VirtualHost>

<VirtualHost 192.168.1.23>
DocumentRoot /home/web/sites/website_two.com
ServerName www.website_two.com
ServerAlias website_two.com
</VirtualHost>


This will set up 2 virtual websites, each on there own ip address, if you want them both to be on the same ip address post back and I will alter that to show you what to do for that. Also after any change you make to apache you must restart apache, you can do that from the main page for apache in webmin.

emetib 09-25-2003 08:50 PM

if you would like to have them at the same address...
NameVirtualHost your ipaddress

and then where cli_man has the ip in the VirtualHost area, put the same one in there, the one you typed above. put the Name... before any of the <VirtualHost....>'s

cheers.


All times are GMT -5. The time now is 03:58 PM.