LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-25-2003, 03:35 PM   #1
Spudley
Member
 
Registered: Mar 2003
Location: Berkshire, England.
Distribution: SuSE 10.0
Posts: 299

Rep: Reputation: 32
Question 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.
 
Old 09-25-2003, 08:31 PM   #2
cli_man
Member
 
Registered: Apr 2002
Location: New York, USA
Distribution: Redhat 7.2, 9.0 Slackware 9.1
Posts: 428

Rep: Reputation: 30
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.
 
Old 09-25-2003, 08:50 PM   #3
emetib
Member
 
Registered: Feb 2003
Posts: 482

Rep: Reputation: 33
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
About setting up virtual hosts raymond Linux - General 7 09-21-2004 09:14 AM
apache virtual hosts smaida Linux - Software 3 06-20-2004 04:28 PM
Apache Virtual Hosts gbg Linux - Software 4 10-02-2003 08:35 AM
Apache virtual hosts Mil0 Linux - Software 5 06-01-2003 11:58 PM


All times are GMT -5. The time now is 01:26 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration