LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-17-2004, 11:55 AM   #1
matneyc
Member
 
Registered: Aug 2004
Posts: 31

Rep: Reputation: 15
multiple website hosting


I have put in 2 test domains on my RH9 server. i have made the virtual host settings in /etc/httpd/conf/httpd.conf according to 2 articles that i pulled off the web and my RH9 bible. my config of

NameVirtualHost *

<VirtualHost *>
DocumentRoot /var/www/sitename1.net
ServerName www.sitename1.net
ServerAdmin dmatney@sitename1.net
ErrorLog logs/sitename1.net.log
</virtualhost>

and then the same paragraph for site 2 with all the correct settings
when i put the actual IP address after the virtualhost tag

<VirtualHost xx.xx.xx.xx>

i get "ERROR 400".

and the same thing when i use <VirtualHost *>

Does anyone have any suggestions for this? I would greatly appreciate it.

cdm
 
Old 12-20-2004, 02:34 PM   #2
linuxlastslonge
Member
 
Registered: Jun 2002
Location: Franklin, IN
Distribution: Debian, CentOS, Mac OS X
Posts: 158

Rep: Reputation: 30
make the following changes to match your configuration:

Code:
NameVirtualHost *:80

<VirtualHost *:80>
        ServerAdmin webmaster@one.com
        DocumentRoot /website/one/location
        ServerName server.one.com
        ErrorLog logs/server.one.com-error_log
        CustomLog logs/server.one.com-access_log common
</VirtualHost>
<VirtualHost *:80>
        ServerAdmin webmaster@one.com
        DocumentRoot /website/two/location
        ServerName server.two.com
        ErrorLog logs/server.two.com-error_log
        CustomLog logs/server.two.com-access_log common
</VirtualHost>

also... be sure to check your DNS settings to make sure they are setup correctly.

hope i could help!!!!


-linuxlastslonger-
 
Old 12-20-2004, 02:37 PM   #3
matneyc
Member
 
Registered: Aug 2004
Posts: 31

Original Poster
Rep: Reputation: 15
you are local. that is different!
thanks for the help. i have been trying to work on this all day. my httpd.conf file looks really messed up after using the graphical tool. i backed up my httpd.conf file but, it was already messed up. any ideas on getting a new httpd.conf file without blowing away all that i have?
 
Old 12-20-2004, 02:59 PM   #4
matneyc
Member
 
Registered: Aug 2004
Posts: 31

Original Poster
Rep: Reputation: 15
i am not going to worry much on the dns for now. i think that it is ok. whenever i service start httpd, that is where i get the errors.

[root@abs05 conf]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: [Mon Dec 20 15:24:23 2004] [warn] VirtualHost www.micromgrs.net:80 overlaps with VirtualHost www.abshr.net:80, the first has precedence, perhaps you need a NameVirtualHost directive
[FAILED]

here is what the httpd.conf looks like (not sure where the first virtual host came from)

<VirtualHost *>
ServerSignature email
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel warn
HostNameLookups off
</VirtualHost>

<VirtualHost www.micromgrs.net:80>
ServerAdmin dmatney@micromgrs.net
DocumentRoot /var/www/html/micromgrs
ServerName www.micromgrs.net
ErrorLog /var/log/micromgrs.log
</virtualHost>

<VirtualHost www.abshr.net:80>
ServerAdmin dmatney@abshr.net
DocumentRoot /var/www/html/micromgrs
ServerName www.abshr.net
ErrorLog /var/log/abshr.log
</VirtualHost>

the NameVirtualServer * does not appear and does not change the startup status with or without it.
 
Old 12-20-2004, 03:21 PM   #5
matneyc
Member
 
Registered: Aug 2004
Posts: 31

Original Poster
Rep: Reputation: 15
check that - i found the problem. the directory for abshr and micromgrs are the same. once i got that fixed, i tried to restart and it just says that the service failed. no reason this time.
 
  


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
hosting my own website metallica1973 Linux - Networking 4 10-16-2005 02:49 PM
website hosting jkmartha Linux - Newbie 1 05-06-2005 04:01 AM
Need good website hosting distro Joey2619 Linux - Distributions 5 12-11-2004 04:53 PM
Hosting and other website related Advertising Forum bjdea1 LQ Suggestions & Feedback 3 09-08-2004 01:40 PM
Website Hosting and file/folder ownership vbfischer Linux - Security 2 07-01-2004 12:31 PM

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

All times are GMT -5. The time now is 02:00 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
Open Source Consulting | Domain Registration