You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by John Doumani <fu...@attbi.com> on 2003/04/02 03:03:16 UTC

[users@httpd] VirtualHost Hosing me up

Hello,

I am having some problems working with VirtualHost. Whenever I add the
following code to my http.conf file, I have the following strange behaviour:

a) I can't access any files other than the index file at the document root
of the server.
b) neither one of the virtual hosts actually resolves.

I am new to the web server world. Any insight into this would be most
appreciated. Do I need to contact the registrar of my domains and have then
point to my IP address? If so, will they both point to the same IP address
and the configuration file will resolve each to the correct document root?

 I am  running Apache 2.044 on Windows 2000 professional

--------------------------------------
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 admin@domain1.net
    DocumentRoot "D:/Program Files/Apache Group/Apache2/domain1"
    ServerName hokkeko.net
    ServerAlias www.domain1.net
    <Directory "D:/Program Files/Apache Group/Apache2/domain1">
      Options Indexes FollowSymLinks Multiviews Includes ExecCGI
      AllowOverride None
      Order allow,deny
      allow from all
    </Directory>
    ErrorLog logs/domain1.com-error_log
    CustomLog logs/domain1.com-access_log common
</VirtualHost>

<VirtualHost *>
    ServerAdmin admin@domain2.com
    DocumentRoot "D:/Program Files/Apache Group/Apache2/domain2"
    ServerName lthrgrizzly.com
    ServerAlias www.domain2.com
    <Directory "D:/Program Files/Apache Group/Apache2/domain2">
      Options Indexes FollowSymLinks Multiviews Includes ExecCGI
      AllowOverride None
      Order allow,deny
      allow from all
    </Directory>
    ErrorLog logs/domain2.com-error_log
    CustomLog logs/domain2.com-access_log common
</VirtualHost>




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] VirtualHost Hosing me up

Posted by Mystery Admin <my...@whatfantasiesmaycome.com>.
On Tue, 1 Apr 2003 at 16:51:00, John Doumani wrote:

> I am new to the web server world. Any insight into this would be most
> appreciated. Do I need to contact the registrar of my domains and have then
> point to my IP address? If so, will they both point to the same IP address
> and the configuration file will resolve each to the correct document root?

I don't know if this is _required_ but it might simplify things some.

Here is a quote from the doc:

"Now when a request arrives, the server will first check if it is using an IP
address that matches the NameVirtualHost. If it is, then it will look at each
<VirtualHost> section with a matching IP address and try to find one where the
ServerName or ServerAlias matches the requested hostname. If it finds one, then
it uses the configuration for that server. If no matching virtual host is found,
then the first listed virtual host that matches the IP address will be used."

http://httpd.apache.org/docs/vhosts/name-based.html

This might be what's going on.  

Peace.....

Tom

___________________
http://jawmail.org/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] VirtualHost Hosing me up

Posted by Mystery Admin <my...@whatfantasiesmaycome.com>.
On Wed, 2 Apr 2003 at 04:09:48, John Doumani wrote:

> Pinging
> www.domain2.com gets an unknown host error. I have double-checked with my
> domain manager to make sure that the domain is properly mapped to the same
> IP address.
> 
> Any ideas why one domain would work but not the other?

If you use the command line "ping" to ping www.domain2.com and you get unknown
host errors, there is a problem with how domain2.com is registered.  This is an
IP oriented problem and NOT an Apache problem.

Use the "nslookup {domain2.com}" command to see what the IP address is of
domain2.com.  If you send me e-mail offline, I can help you with this
(researching the domain problem) a bit more.

Once you can ping www.domain2.com, you should be able to access that virtual
host ok.

Peace....

Tom

___________________
http://jawmail.org/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] VirtualHost Hosing me up

Posted by Mystery Admin <my...@whatfantasiesmaycome.com>.
On Wed, 2 Apr 2003 at 14:06:28, John Doumani wrote:

> Err... I mean Jeff!! sorry

Hey pal, get it right!  :)

(Just joking... :))

Peace...

Tom

___________________
http://jawmail.org/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] VirtualHost Hosing me up

Posted by John Doumani <fu...@attbi.com>.
Err... I mean Jeff!! sorry

----- Original Message -----
From: "John Doumani" <fu...@attbi.com>
To: <us...@httpd.apache.org>
Sent: Wednesday, April 02, 2003 2:16 PM
Subject: Re: [users@httpd] VirtualHost Hosing me up


> Thank you for the replies Tom, Josh, and Girish.
>
> I believe that the problem stems from the fact that domain2.com -
registered
> less than 48 hours ago - has not propogated throughout the Internet world.
> That's what my domain registrar tells me as well. I will give it another
day
> and see if this problem resolves itself.
>
> Returning the peace,
>
> John
> ----- Original Message -----
> From: "Mystery Admin" <my...@whatfantasiesmaycome.com>
> To: <us...@httpd.apache.org>
> Sent: Wednesday, April 02, 2003 6:47 AM
> Subject: Re: [users@httpd] VirtualHost Hosing me up
>
>
> On Wed, 2 Apr 2003 at 04:09:48, John Doumani wrote:
>
> > Pinging
> > www.domain2.com gets an unknown host error. I have double-checked with
my
> > domain manager to make sure that the domain is properly mapped to the
same
> > IP address.
> >
> > Any ideas why one domain would work but not the other?
>
> If you use the command line "ping" to ping www.domain2.com and you get
> unknown
> host errors, there is a problem with how domain2.com is registered.  This
is
> an
> IP oriented problem and NOT an Apache problem.
>
> Use the "nslookup {domain2.com}" command to see what the IP address is of
> domain2.com.  If you send me e-mail offline, I can help you with this
> (researching the domain problem) a bit more.
>
> Once you can ping www.domain2.com, you should be able to access that
virtual
> host ok.
>
> Peace....
>
> Tom
>
> ___________________
> http://jawmail.org/
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] VirtualHost Hosing me up

Posted by John Doumani <fu...@attbi.com>.
Thank you for the replies Tom, Josh, and Girish.

I believe that the problem stems from the fact that domain2.com - registered
less than 48 hours ago - has not propogated throughout the Internet world.
That's what my domain registrar tells me as well. I will give it another day
and see if this problem resolves itself.

Returning the peace,

John
----- Original Message -----
From: "Mystery Admin" <my...@whatfantasiesmaycome.com>
To: <us...@httpd.apache.org>
Sent: Wednesday, April 02, 2003 6:47 AM
Subject: Re: [users@httpd] VirtualHost Hosing me up


On Wed, 2 Apr 2003 at 04:09:48, John Doumani wrote:

> Pinging
> www.domain2.com gets an unknown host error. I have double-checked with my
> domain manager to make sure that the domain is properly mapped to the same
> IP address.
>
> Any ideas why one domain would work but not the other?

If you use the command line "ping" to ping www.domain2.com and you get
unknown
host errors, there is a problem with how domain2.com is registered.  This is
an
IP oriented problem and NOT an Apache problem.

Use the "nslookup {domain2.com}" command to see what the IP address is of
domain2.com.  If you send me e-mail offline, I can help you with this
(researching the domain problem) a bit more.

Once you can ping www.domain2.com, you should be able to access that virtual
host ok.

Peace....

Tom

___________________
http://jawmail.org/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] VirtualHost Hosing me up

Posted by Jeff Cohen <li...@gej-it.com>.
Can you try just loading 1 website and try the addresses to make sure they
are pointing to your IPs?
Jeff Cohen

> -----Original Message-----
> From: John Doumani [mailto:fuguma@attbi.com]
> Sent: Wednesday, April 02, 2003 7:22 AM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] VirtualHost Hosing me up
> 
> Thank you Jeff And Mystery Admin for your responses!
> 
> I have been successful in getting domain1.net to resolve correctly however
> domain2.com comes back with "The page cannot be displayed" error. Pinging
> www.domain2.com gets an unknown host error. I have double-checked with my
> domain manager to make sure that the domain is properly mapped to the same
> IP address.
> 
> Any ideas why one domain would work but not the other?
> 
> John
> 
> 
> ----- Original Message -----
> From: "Jeff Cohen" <li...@gej-it.com>
> To: <us...@httpd.apache.org>
> Sent: Tuesday, April 01, 2003 9:01 PM
> Subject: RE: [users@httpd] VirtualHost Hosing me up
> 
> 
> > Hello,
> >
> > I am having some problems working with VirtualHost. Whenever I add the
> > following code to my http.conf file, I have the following strange
> behaviour:
> >
> > a) I can't access any files other than the index file at the document
root
> > of the server.
> > b) neither one of the virtual hosts actually resolves.
> >
> > I am new to the web server world. Any insight into this would be most
> > appreciated. Do I need to contact the registrar of my domains and have
> then
> > point to my IP address? If so, will they both point to the same IP
address
> > and the configuration file will resolve each to the correct document
root?
> >
> >  I am  running Apache 2.044 on Windows 2000 professional
> >
> 
> HI,
> Your configuration looks OK to me, except the ExecCGI at the document root
> folder unless you are running .pl and .cgi scripts in the root folder
(also
> not really idle).
> The domain names that you want to host must point to the same IP address
> that the server listens on, that's for sure, for testing purposes you can
> edit you local hosts file and add the server's IP address and see the
> resolution.
> 
> All the best,
> Jeff Cohen
> 
> 
> > --------------------------------------
> > 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 admin@domain1.net
> >     DocumentRoot "D:/Program Files/Apache Group/Apache2/domain1"
> >     ServerName hokkeko.net
> >     ServerAlias www.domain1.net
> >     <Directory "D:/Program Files/Apache Group/Apache2/domain1">
> >       Options Indexes FollowSymLinks Multiviews Includes ExecCGI
> >       AllowOverride None
> >       Order allow,deny
> >       allow from all
> >     </Directory>
> >     ErrorLog logs/domain1.com-error_log
> >     CustomLog logs/domain1.com-access_log common
> > </VirtualHost>
> >
> > <VirtualHost *>
> >     ServerAdmin admin@domain2.com
> >     DocumentRoot "D:/Program Files/Apache Group/Apache2/domain2"
> >     ServerName lthrgrizzly.com
> >     ServerAlias www.domain2.com
> >     <Directory "D:/Program Files/Apache Group/Apache2/domain2">
> >       Options Indexes FollowSymLinks Multiviews Includes ExecCGI
> >       AllowOverride None
> >       Order allow,deny
> >       allow from all
> >     </Directory>
> >     ErrorLog logs/domain2.com-error_log
> >     CustomLog logs/domain2.com-access_log common
> > </VirtualHost>
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server
Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] VirtualHost Hosing me up

Posted by John Doumani <fu...@attbi.com>.
Thank you Jeff And Mystery Admin for your responses!

I have been successful in getting domain1.net to resolve correctly however
domain2.com comes back with "The page cannot be displayed" error. Pinging
www.domain2.com gets an unknown host error. I have double-checked with my
domain manager to make sure that the domain is properly mapped to the same
IP address.

Any ideas why one domain would work but not the other?

John


----- Original Message -----
From: "Jeff Cohen" <li...@gej-it.com>
To: <us...@httpd.apache.org>
Sent: Tuesday, April 01, 2003 9:01 PM
Subject: RE: [users@httpd] VirtualHost Hosing me up


> Hello,
>
> I am having some problems working with VirtualHost. Whenever I add the
> following code to my http.conf file, I have the following strange
behaviour:
>
> a) I can't access any files other than the index file at the document root
> of the server.
> b) neither one of the virtual hosts actually resolves.
>
> I am new to the web server world. Any insight into this would be most
> appreciated. Do I need to contact the registrar of my domains and have
then
> point to my IP address? If so, will they both point to the same IP address
> and the configuration file will resolve each to the correct document root?
>
>  I am  running Apache 2.044 on Windows 2000 professional
>

HI,
Your configuration looks OK to me, except the ExecCGI at the document root
folder unless you are running .pl and .cgi scripts in the root folder (also
not really idle).
The domain names that you want to host must point to the same IP address
that the server listens on, that's for sure, for testing purposes you can
edit you local hosts file and add the server's IP address and see the
resolution.

All the best,
Jeff Cohen


> --------------------------------------
> 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 admin@domain1.net
>     DocumentRoot "D:/Program Files/Apache Group/Apache2/domain1"
>     ServerName hokkeko.net
>     ServerAlias www.domain1.net
>     <Directory "D:/Program Files/Apache Group/Apache2/domain1">
>       Options Indexes FollowSymLinks Multiviews Includes ExecCGI
>       AllowOverride None
>       Order allow,deny
>       allow from all
>     </Directory>
>     ErrorLog logs/domain1.com-error_log
>     CustomLog logs/domain1.com-access_log common
> </VirtualHost>
>
> <VirtualHost *>
>     ServerAdmin admin@domain2.com
>     DocumentRoot "D:/Program Files/Apache Group/Apache2/domain2"
>     ServerName lthrgrizzly.com
>     ServerAlias www.domain2.com
>     <Directory "D:/Program Files/Apache Group/Apache2/domain2">
>       Options Indexes FollowSymLinks Multiviews Includes ExecCGI
>       AllowOverride None
>       Order allow,deny
>       allow from all
>     </Directory>
>     ErrorLog logs/domain2.com-error_log
>     CustomLog logs/domain2.com-access_log common
> </VirtualHost>
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] VirtualHost Hosing me up

Posted by Jeff Cohen <li...@gej-it.com>.
> Hello,
> 
> I am having some problems working with VirtualHost. Whenever I add the
> following code to my http.conf file, I have the following strange
behaviour:
> 
> a) I can't access any files other than the index file at the document root
> of the server.
> b) neither one of the virtual hosts actually resolves.
> 
> I am new to the web server world. Any insight into this would be most
> appreciated. Do I need to contact the registrar of my domains and have
then
> point to my IP address? If so, will they both point to the same IP address
> and the configuration file will resolve each to the correct document root?
> 
>  I am  running Apache 2.044 on Windows 2000 professional
> 

HI,
Your configuration looks OK to me, except the ExecCGI at the document root
folder unless you are running .pl and .cgi scripts in the root folder (also
not really idle).
The domain names that you want to host must point to the same IP address
that the server listens on, that's for sure, for testing purposes you can
edit you local hosts file and add the server's IP address and see the
resolution.

All the best,
Jeff Cohen


> --------------------------------------
> 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 admin@domain1.net
>     DocumentRoot "D:/Program Files/Apache Group/Apache2/domain1"
>     ServerName hokkeko.net
>     ServerAlias www.domain1.net
>     <Directory "D:/Program Files/Apache Group/Apache2/domain1">
>       Options Indexes FollowSymLinks Multiviews Includes ExecCGI
>       AllowOverride None
>       Order allow,deny
>       allow from all
>     </Directory>
>     ErrorLog logs/domain1.com-error_log
>     CustomLog logs/domain1.com-access_log common
> </VirtualHost>
> 
> <VirtualHost *>
>     ServerAdmin admin@domain2.com
>     DocumentRoot "D:/Program Files/Apache Group/Apache2/domain2"
>     ServerName lthrgrizzly.com
>     ServerAlias www.domain2.com
>     <Directory "D:/Program Files/Apache Group/Apache2/domain2">
>       Options Indexes FollowSymLinks Multiviews Includes ExecCGI
>       AllowOverride None
>       Order allow,deny
>       allow from all
>     </Directory>
>     ErrorLog logs/domain2.com-error_log
>     CustomLog logs/domain2.com-access_log common
> </VirtualHost>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org