LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 02-18-2004, 08:12 AM   #1
dienerk
Member
 
Registered: Feb 2004
Location: Ocala, Florida
Distribution: Suse 9.1 Pro, Redhat 9, Mandrake 9.2 & 8.1, Fedora 2, and White Board
Posts: 54

Rep: Reputation: 15
Unhappy redhat 7.3 apache virtual hosts


I am trying to setup virtual hosts using apache in redhat 7.3. All I ever get is the default page. I have read the apache documentation and everything I try still doesn't work. Is there something else that will walk me through it in "see spot run" language? I need to host about 8 web sites. PLEASE Help.

Thanx

(I may have posted in wrong section earlier, NEWBIE!)
 
Old 02-18-2004, 08:38 AM   #2
_KDF
Member
 
Registered: Oct 2003
Distribution: FC4/5 & RHEL4
Posts: 133

Rep: Reputation: 15
Are you using virtual hosts by domain ? eg something.somwhere.com goes to one site something2.somewhere.com goes somewhere else.

All you need to do is specify your virtual hosts in the httpd.conf file.
 
Old 02-18-2004, 08:49 AM   #3
dienerk
Member
 
Registered: Feb 2004
Location: Ocala, Florida
Distribution: Suse 9.1 Pro, Redhat 9, Mandrake 9.2 & 8.1, Fedora 2, and White Board
Posts: 54

Original Poster
Rep: Reputation: 15
I just want to host 8 different sites using the same IP number.
 
Old 02-18-2004, 08:51 AM   #4
dienerk
Member
 
Registered: Feb 2004
Location: Ocala, Florida
Distribution: Suse 9.1 Pro, Redhat 9, Mandrake 9.2 & 8.1, Fedora 2, and White Board
Posts: 54

Original Poster
Rep: Reputation: 15
These are different .com's and .biz sites (maybe I failed to mention that)
 
Old 02-18-2004, 08:55 AM   #5
_KDF
Member
 
Registered: Oct 2003
Distribution: FC4/5 & RHEL4
Posts: 133

Rep: Reputation: 15
as long as you specify them in your conf file it should work no problem, hold on I will try to paste an example from my conf file..
 
Old 02-18-2004, 08:57 AM   #6
_KDF
Member
 
Registered: Oct 2003
Distribution: FC4/5 & RHEL4
Posts: 133

Rep: Reputation: 15
NameVirtualHost 123.123.123.123
<VirtualHost 123.123.123.123>
ServerName www.yourdomain.com
ServerPath /pathtoserver
DocumentRoot /pathto/webfiles/
</VirtualHost>
 
Old 02-18-2004, 09:00 AM   #7
dienerk
Member
 
Registered: Feb 2004
Location: Ocala, Florida
Distribution: Suse 9.1 Pro, Redhat 9, Mandrake 9.2 & 8.1, Fedora 2, and White Board
Posts: 54

Original Poster
Rep: Reputation: 15
I have tried to edit conf file in the past and it never works for me. I continue to get default page. An example would be great!
 
Old 02-18-2004, 09:03 AM   #8
dienerk
Member
 
Registered: Feb 2004
Location: Ocala, Florida
Distribution: Suse 9.1 Pro, Redhat 9, Mandrake 9.2 & 8.1, Fedora 2, and White Board
Posts: 54

Original Poster
Rep: Reputation: 15
Thank you for the example, I have tried something similar in an example I found last night, but still got default page.
 
Old 02-18-2004, 09:06 AM   #9
dienerk
Member
 
Registered: Feb 2004
Location: Ocala, Florida
Distribution: Suse 9.1 Pro, Redhat 9, Mandrake 9.2 & 8.1, Fedora 2, and White Board
Posts: 54

Original Poster
Rep: Reputation: 15
Thanx for the help, I guess I will try it again and let you know. I must have followed the example incorrectly. I will use your example and try. I will post reply to let you know if I stil cannot get it.

Much Thanx
 
Old 02-18-2004, 09:09 AM   #10
_KDF
Member
 
Registered: Oct 2003
Distribution: FC4/5 & RHEL4
Posts: 133

Rep: Reputation: 15
make sure you restart apache after any changes to the conf file.

# /usr/sbin/apachectl restart

(your apache restart command may vary between distro's)
 
Old 02-19-2004, 10:51 AM   #11
dienerk
Member
 
Registered: Feb 2004
Location: Ocala, Florida
Distribution: Suse 9.1 Pro, Redhat 9, Mandrake 9.2 & 8.1, Fedora 2, and White Board
Posts: 54

Original Poster
Rep: Reputation: 15
So what am I not getting! I still only get the default page. I am reading everything I can find and trying everything I read, as much as I can anyway, but still get the default page. I don't want to give up but I am starting to get frustrated to the point of going back to a windows based server. I even installed webmin and keep getting the default page. If someone can help, please do.
 
Old 02-19-2004, 11:01 AM   #12
elhombre
LQ Newbie
 
Registered: Oct 2003
Location: tx
Distribution: RH8 and SuSE9
Posts: 4

Rep: Reputation: 0
i had the same problem when i first started setting up VD in rh8. i got some help from a buddy and we still couldn't get it fixed. i ended up having to start over with the original httpd.conf and did it all by command line. no more making changes in the GUI for me. i also assigned an IP to my rh8 system to minimize confusion in the conf file. before i had it obtaining ips automatically. not sure if that was a problem but a few other linux users recommended i do that. good luck.
 
Old 02-19-2004, 01:49 PM   #13
fragglehorn
Member
 
Registered: Oct 2002
Location: I-Town, NY
Distribution: Debian, Slackware
Posts: 130

Rep: Reputation: 15
dienerk,

How about if some fresh eyes could see your httpd.conf file? It might be something relatively easy that you're missing after staring at it for so long.
 
Old 02-20-2004, 01:18 AM   #14
dienerk
Member
 
Registered: Feb 2004
Location: Ocala, Florida
Distribution: Suse 9.1 Pro, Redhat 9, Mandrake 9.2 & 8.1, Fedora 2, and White Board
Posts: 54

Original Poster
Rep: Reputation: 15
Maybe this will help, let me know if there is more of the file that you need.

NameVirtualHost 12.345.678.912


<VirtualHost 12.345.678.912:*>
DocumentRoot /var/www/html/diener.us
ServerName diener.us
DirectoryIndex index.htm index.html
</VirtualHost>

Thanx for the help.
 
Old 02-20-2004, 10:51 AM   #15
fragglehorn
Member
 
Registered: Oct 2002
Location: I-Town, NY
Distribution: Debian, Slackware
Posts: 130

Rep: Reputation: 15
This might not be terribly important, but there's no need to specify a port following your ip address. You could try this:

<VirtualHost 12.345.678.912>

or even this:


NameVirtualHost *

<VirtualHost *>
 
  


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 07:29 AM
apache virtual hosts Red Squirrel Linux - Software 4 06-20-2004 10:05 AM
redhat apache virtual hosts dienerk Red Hat 6 02-20-2004 01:43 PM
Webpage loads slowly using virtual hosts in Apache 2.0 Linux Redhat 9 dste0713 Linux - General 0 01-21-2004 01:35 PM
Apache Virtual Hosts quozt Linux - General 3 10-15-2003 10:51 AM


All times are GMT -5. The time now is 11:39 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration