LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-15-2004, 10:45 PM   #1
tommyliu
LQ Newbie
 
Registered: Jun 2004
Location: Hong Kong
Posts: 15

Rep: Reputation: 0
Question About Virtual Host of Apache Server


Dear all experts,

I have a host call "linux9". In dns server, there have alias record

of "linux9" are "webmin" and "www".

I setup a virtual host "webmin" in apache server but I don't

setup "www" in apache server. Unfortunately, In web browser, I

type both "www" and "webmin" can go to same home

page. Is it possible I type "www" show the cannot locate

homepage web page ???

Thanks,

Tommy
 
Old 06-16-2004, 06:02 AM   #2
MiscGeek
Member
 
Registered: Jan 2003
Location: Georgia, US
Distribution: RHEL WS4
Posts: 189

Rep: Reputation: 30
Tommy,

Could you post the VirtualHost section from your httpd.conf? If you have www and webmin pointing to the same IP you'll need to use named virtual hosts.

Mike
 
Old 06-16-2004, 02:55 PM   #3
tommyliu
LQ Newbie
 
Registered: Jun 2004
Location: Hong Kong
Posts: 15

Original Poster
Rep: Reputation: 0
Dear Mike,

My config as follow:


DocumentRoot /usr/libexec/webmin /etc/httpd/conf/httpd.conf
ServerName webmin /etc/httpd/conf/httpd.conf
SetEnv WEBMIN_CONFIG /etc/webmin /etc/httpd/conf/httpd.conf
SetEnv WEBMIN_VAR /var/webmin /etc/httpd/conf/httpd.conf
SetEnv SERVER_ROOT /usr/libexec/webmin /etc/httpd/conf/httpd.conf
SetEnv MINISERV_CONFIG /etc/webmin/miniserv.conf /etc/httpd/conf/httpd.conf
<Directory "/usr/libexec/webmin">
AuthName "Webmin Restrict Area" /etc/httpd/conf/httpd.conf
AuthType Basic /etc/httpd/conf/httpd.conf
AuthUserFile /etc/webmin/htusers /etc/httpd/conf/httpd.conf
require valid-user /etc/httpd/conf/httpd.conf
Options ExecCGI /etc/httpd/conf/httpd.conf
DirectoryIndex index.cgi /etc/httpd/conf/httpd.conf
</Directory>



thanks
 
Old 06-17-2004, 05:58 AM   #4
MiscGeek
Member
 
Registered: Jan 2003
Location: Georgia, US
Distribution: RHEL WS4
Posts: 189

Rep: Reputation: 30
What version of apache are you using?

I don't recognize of the config entries . You may want to try starting apache using the -S parameter to verify the your configuration.

Also, is the above lines contained in a <VirtualHost> tag?
 
Old 06-17-2004, 10:11 AM   #5
tommyliu
LQ Newbie
 
Registered: Jun 2004
Location: Hong Kong
Posts: 15

Original Poster
Rep: Reputation: 0
About config

<VirtualHost 192.168.1.31:80>
DocumentRoot /usr/libexec/webmin
ServerName webmin
SetEnv WEBMIN_CONFIG /etc/webmin
SetEnv WEBMIN_VAR /var/webmin
SetEnv SERVER_ROOT /usr/libexec/webmin
SetEnv MINISERV_CONFIG /etc/webmin/miniserv.conf
<Directory "/usr/libexec/webmin">
AuthName "Webmin Restrict Area"
AuthType Basic
AuthUserFile /etc/webmin/htusers
require valid-user
Options ExecCGI
DirectoryIndex index.cgi
</Directory>
</VirtualHost>
 
Old 06-17-2004, 10:49 AM   #6
MiscGeek
Member
 
Registered: Jan 2003
Location: Georgia, US
Distribution: RHEL WS4
Posts: 189

Rep: Reputation: 30
Ok, that configuration looks fine.

However, it looks like your using IP based virtual hosting which means that it looks at the IP rather than server name. So, any name in your DNS that resolves to that IP will be able to access the home page.

I haven't setup named virtual hosting in awhile but, you might want to check the docs on the apache site. If I remember correctly they have a pretty good section on setting up virtual hosts.

You can use the search and look for virtual host.

http://www.apache.org

Mike
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2 Virtual host eckertc1 Linux - Software 6 03-22-2005 09:58 PM
Apache 2.0 Virtual Host? w0lfeyes Linux - Networking 1 05-03-2004 03:09 PM
Virtual host and apache Samspeed Linux - General 8 08-06-2003 07:41 AM
apache virtual host navinc Linux - Software 10 05-22-2003 12:16 PM
apache virtual host mimi Linux - General 1 04-06-2002 05:11 AM


All times are GMT -5. The time now is 01:56 PM.

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