LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-13-2004, 06:18 PM   #1
rickdeez
LQ Newbie
 
Registered: Jul 2004
Posts: 5

Rep: Reputation: 0
Virtual Host Setup


I am having a problem setting up my Virtual Hosts.

I have a linux server w/ RedHat9 and Webmin installed.

My first question is, what's the difference between Virtual Servers (listed in webmin) and Virtual Hosts (httpd conf)?

My problem: i have my server IP set to the default host, and i want to add a subdomain as a virtual host for now. My problem is when i try adding the virtual host for the subdomain, it changes both the virtual host and the default one.

The subdomain works correctly when i add the Virtual Host for it, but it also changes the IP address to the same page.

Any suggestions? Thanks in advance.
 
Old 07-14-2004, 04:42 PM   #2
rickdeez
LQ Newbie
 
Registered: Jul 2004
Posts: 5

Original Poster
Rep: Reputation: 0
bump
 
Old 07-14-2004, 08:34 PM   #3
emetib
Member
 
Registered: Feb 2003
Posts: 484

Rep: Reputation: 33
what distro are you using?
in mdk there is a seperate vhosts file. in deb, and i believe rh, it's at the end of the httpd. file. drop your config here and we'll look at it.
 
Old 07-15-2004, 08:53 AM   #4
rickdeez
LQ Newbie
 
Registered: Jul 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Re: Virtual Host Setup

Quote:
Originally posted by rickdeez
I have a linux server w/ RedHat9 and Webmin installed.

My first question is, what's the difference between Virtual Servers (listed in webmin) and Virtual Hosts (httpd conf)?


NameVirtualHost 999.99.999.999

<VirtualHost _default_>
DocumentRoot /home/site1/public_html
ServerName site1.domain.com
</VirtualHost>

<VirtualHost _default_>
DocumentRoot /home/site2/public_html
ServerName site2.domain.com
</VirtualHost>

<VirtualHost 999.99.999.999>
DocumentRoot /var/www/html
ServerName 999.99.999.999
</VirtualHost>
 
Old 07-15-2004, 09:47 AM   #5
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
you can try
Code:
httpd -S
to find out whether apache has really liked your vhost config.
 
Old 07-15-2004, 10:37 AM   #6
rickdeez
LQ Newbie
 
Registered: Jul 2004
Posts: 5

Original Poster
Rep: Reputation: 0
httpd -S

Just lists more option commands.

[ httpd: illegal option -- S ]
 
Old 07-15-2004, 10:38 AM   #7
netmask
Member
 
Registered: Jul 2004
Location: Sherbrooke, Quebec, Canada, North America, World, Milky Way
Distribution: Gentoo
Posts: 103

Rep: Reputation: 16
try apachectl -t (for configtest)
 
Old 07-15-2004, 10:59 AM   #8
rickdeez
LQ Newbie
 
Registered: Jul 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Syntax OK
 
Old 07-15-2004, 07:16 PM   #9
emetib
Member
 
Registered: Feb 2003
Posts: 484

Rep: Reputation: 33
sorry about the last question. very tired.

what i would do is to get rid of the default and put the ip in it's place. the ip of the server. do a ifconfig to see what ip your server is running off of and then forward that ip:80 to your server. for the 99.999.99.999 domain, i would put the server address in that spot and just have it's name, servername, 99.999.99.999. that way all of your vhosts are running off of the same ip and the only thing that controls what is shown is the url that is typed in. that is which ever server you want to look at.

if you are still having lots of troubles with it. check here for more information on your config and testing of the config files.

virtual server- Virtual server is a highly scalable and highly available server built on a cluster of real servers.
virtual host- The term Virtual Host refers to the practice of maintaining more than one server on one machine, as differentiated by their apparent hostname.
 
  


Reply



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
Want to setup a Virtual Host using Apache. cjkeeme Linux - Networking 1 05-13-2005 05:47 PM
How to setup a host.deny and host.allow for SSH? explorer1979 Linux - Security 2 01-31-2005 05:28 PM
virtual host setup atomicx Linux - General 2 12-18-2003 02:53 PM
Virtual Host setup problem bmzf Linux - General 9 08-31-2003 01:00 AM
Images dissappearing in Apache virtual host setup c-ker Linux - Software 0 08-04-2003 07:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:53 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration