Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 21st, 2004, 04:59 PM
hebertovich hebertovich is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 4 hebertovich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry Virtual host not bringing up other hosts >>>Heeeeeeeeeelp!

HI I have a problem
I am trying to virtual host 2 webpages on my Apache 2.0 webserver, but
when I put in the virtual host commands as per the documentation, all
I get is the webpage that is in the first place of the virtual host
command and can not seem to get the second webpage no matter what URL
I use??

>>>>Here is the argument I put in the httpd.conf <<<<<

<VirtualHost *:80>
ServerName apeture.ca
DocumentRoot "D:\xxx\xxx"
</VirtualHost>

<VirtualHost *:80>
ServerName hooliganwear.ca
DocumentRoot "E:\xxx\xxx"
</VirtualHost>

(x =the actual drive locations )

The thing is if I reverse this I get the other webpage?? Do I have to
change anything in my original ServerName or DocumentRoot. Last
entries on the error log after I restart the server and try are as
follows:
[Sun Jan 18 16:03:00 2004] [notice] Parent: Received restart signal --
Restarting the server.
>>>>>>>
[Sun Jan 18 16:03:00 2004] [warn] _default_ VirtualHost overlap on
port 80, the first has precedence
[Sun Jan 18 16:03:00 2004] [notice] Parent: Created child process 5964
[Sun Jan 18 16:03:01 2004] [warn] _default_ VirtualHost overlap on
port 80, the first has precedence
[Sun Jan 18 16:03:01 2004] [warn] _default_ VirtualHost overlap on
port 80, the first has precedence
[Sun Jan 18 16:03:01 2004] [notice] Child 5964: Child process is
running
[Sun Jan 18 16:03:01 2004] [notice] Child 5964: Acquired the start
mutex.
[Sun Jan 18 16:03:01 2004] [notice] Child 1720: Released the start
mutex
[Sun Jan 18 16:03:01 2004] [notice] Child 5964: Starting 250 worker
threads.
[Sun Jan 18 16:03:02 2004] [notice] Child 1720: Waiting for 250 worker
threads to exit.
[Sun Jan 18 16:03:02 2004] [notice] Child 1720: All worker threads
have exited.
[Sun Jan 18 16:03:02 2004] [notice] Child 1720: Child process is
exiting

Reply With Quote
  #2  
Old January 22nd, 2004, 08:13 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
I suspect it's because you've got the wildcard in the <VirtualHost> directive. That tells apache (I imagine) that the current directive answers for all domains; and as the first is the default, it makes sense that you'd be getting the first. Actually, now that I read the log output, I see that that's exactly what's going on. Try sticking either the servername or the IP address in place of the * and see if that gets you anywhere.

Reply With Quote
  #3  
Old January 23rd, 2004, 02:18 AM
hebertovich hebertovich is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 4 hebertovich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
K Day 6 and I thought this was gonna be easy Do I have to have a router to run 2 websites on 1 apache server??? I have 2 different domain names I've got 2 dns' at zoneedit but they both report to my same external ip. I have a switch not a router after the dsl box and I read that you have to have a router could this be my problem? I really can't figure what to put in NameVitualHost and what to put in the <virtual Host> tags,,,, Man All I want to do is host another web....waaaaaaa !

Reply With Quote
  #4  
Old January 23rd, 2004, 02:19 AM
hebertovich hebertovich is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 4 hebertovich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
<<<Here is my actual log again >>>
#
NameVirtualHost *
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
# ServerAdmin URL
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

<VirtualHost *>
DocumentRoot d:/webserve/````
ServerName URL
</VirtualHost>

<VirtualHost *>
DocumentRoot e:/Outside_web/```````
ServerName URL
</VirtualHost>

<VirtualHost *>
DocumentRoot d:/webserve/`````
ServerName URL
</VirtualHost>


```=directory
I tried ip but is it internal or external? I tried server names ...
If I don't have a router and my dns's are using the same IP's how can my server distinguise between each domaine??? Anyone that can shed light please I'm loosing my eyesight I've read all the apache and dslwebserver info I can

Reply With Quote
  #5  
Old January 23rd, 2004, 06:36 AM
rebeldreams rebeldreams is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: London UK
Posts: 3 rebeldreams User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I agree with the other reply; you need to specify what IP it's connecting to, or the name of the host in the <VirtualHost...> tag.

eg:
<VirtualHost URL>
DocumentRoot /var/www/htdocs/
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
DirectoryIndex index.php index.html index.htm index.shtml

ServerName blibble.com
ServerSignature email
</VirtualHost>



<VirtualHost URL>

DocumentRoot /var/www/blobble/htdocs/

ServerName blobble.com ScriptAlias /cgi-bin/ /var/www/blobble/cgi-bin/

ServerSignature email


</VirtualHost>

And make sure you make the correct DNS entries locally :-DThe <VirtualHost *> tag is usually reserved for the default virtual host, and each successive declaration of <VirtualHost *> overwrites the previous one.

Reply With Quote
  #6  
Old January 24th, 2004, 06:03 PM
hebertovich hebertovich is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 4 hebertovich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Got it working thanks

Got it working I was a bad dns site and a wrong server name and yes you guys were right I did need the ip's in there

Thanks so much guys !!!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > Virtual host problems >>>Heeeeeeeeeelp!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT