LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 01-21-2003, 10:33 PM   #1
smtoughill
LQ Newbie
 
Registered: Sep 2002
Location: New Jersey
Distribution: Red Hat 7.3
Posts: 20

Rep: Reputation: 0
Httpd.conf


I am having problems setting up my server box. I can not get it to goto different index

i want www.mydomain.net to goto one index and info.mydomain.net to goto another how can i get the directives to do that

steven
 
Old 01-21-2003, 11:05 PM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
you need to setup virtual hosts in the httpd.conf file. There should be an example in the file provided by apache. It could look something like this:

Code:
<VirtualHost 10.0.0.199>
    ServerAdmin  dude@host.com
    DocumentRoot /home/dude/www/testpage
    ServerName test.host.com
</VirtualHost>

<VirtualHost 10.0.0.199>
    ServerAdmin  dude@host.com
    DocumentRoot /tmp/download
    ServerName download.host.com
</VirtualHost>
If you machine is not behind a firewall you may have to put your internet IP there.
 
Old 01-27-2003, 12:52 PM   #3
smtoughill
LQ Newbie
 
Registered: Sep 2002
Location: New Jersey
Distribution: Red Hat 7.3
Posts: 20

Original Poster
Rep: Reputation: 0
Thats exactly what i have and no matter what it always goes to the www. it will not goto smt. or info.
also i get this message too.[root@south conf]# /etc/rc.d/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [Mon Jan 27 09:45:09 2003] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Mon Jan 27 09:45:09 2003] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Mon Jan 27 09:45:09 2003] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[ OK ]
 
Old 01-27-2003, 12:57 PM   #4
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Obviously there is a problem with your conf file.
Use
NameVirtualHost *
Restart httpd.

If that doesnt work, post your VirtualHosts settings.
 
Old 01-28-2003, 04:52 AM   #5
smtoughill
LQ Newbie
 
Registered: Sep 2002
Location: New Jersey
Distribution: Red Hat 7.3
Posts: 20

Original Poster
Rep: Reputation: 0
yep that was it! when I came into work today I asked one of the linux guys and in about 1 min he found and corrected the problem. Man it's great when resources pull together. Thanx all now for the next step adding some content and the other web site.
 
Old 01-28-2003, 05:33 AM   #6
cmfarley19
Member
 
Registered: Nov 2002
Location: Central VA
Distribution: Ubuntu/Debian
Posts: 228

Rep: Reputation: 32
Give this a shot...
NamevirtualHost *

<VirtualHost *>
ServerAdmin dude@host.com
#This is the path to your server pages
DocumentRoot /home/dude/www/htdocs1
ServerName www.mydomain.net
</VirtualHost>

<VirtualHost *>
ServerAdmin dude@host.com
#This is the path to your server pages
DocumentRoot /home/dude/www/htdocs2
ServerName info.mydomain.net
</VirtualHost>
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
httpd.conf help eckertc1 Linux - General 2 03-01-2005 01:47 AM
Httpd.conf And Httpd2.conf ???? alejandroye Linux - General 2 11-07-2004 12:23 AM
httpd.conf & ssl.conf kevinm2 Linux - Security 12 08-31-2004 01:25 PM
saving changes to apache2/conf/httpd.conf file Zaius Linux - Newbie 6 01-09-2004 11:45 PM
httpd chokes on ScriptAlias line in Apache httpd.conf lhoff Linux - Software 1 07-14-2003 10:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:43 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