public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Apache vhosts revisited
@ 2005-09-05 16:04 John Dangler
  2005-09-05 18:42 ` RESOLVED " John Dangler
  2005-09-05 20:17 ` q-parser
  0 siblings, 2 replies; 4+ messages in thread
From: John Dangler @ 2005-09-05 16:04 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1622 bytes --]

After going back through the entire thread dealing with the vhosts problem
that was running here recently, I tried to setup my local fileserver with
the 'default' apache server, and adding 1 virtual host.

 

my apache2.conf file is basically a default (out of the box) setup, with the
line

Include conf/vhosts/vhsots.conf uncommented so that it is included.

 

my vhosts.conf file has

<NameVirtualHost 192.168.1.36:80>

 

<VirtualHost 192.168.1.36:80>

  ServerName Mambo

  DocumentRoot /var/www/localhost/htdocs>

</VirtualHost>

 

<VirtualHost 192.168.1.36:80>

  ServerName GenoFit

  DocumentRoot /usr2/genofit/public

  <Driectory /usr2/genofit/public>

    order deny,allow

    Allow from all

    AllowOverride All

    Options FollowSymLinks

  </Directory>

</VirtualHost>

 

from the local machine, both hosts are accessible.

from another machine on the same router (192.168.1.35):

browsing to 192.168.1.36 gives me the Apache default page.

browsing to 192.168.1.36/GenoFit gives me "Not Found" The requested URL
/GenoFit was not found on the server

browsing to 192.168.1.36/Mambo gives me "Not Found" The requested URL /Mambo
was not found on the server

 

ping works in both directions, so I'm sure that it's something I did/didn't
do correctly in the config files.

After reading through the wiki docs on virtual hosts, and the docs on the
apache site (which are a little harder to digest), I think that the vhosts
file is ok, but I'm not sure about the apache2.conf file.

 

Any input is appreciated.

 

John D


[-- Attachment #2: Type: text/html, Size: 6818 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RESOLVED [gentoo-user] Apache vhosts revisited
  2005-09-05 16:04 [gentoo-user] Apache vhosts revisited John Dangler
@ 2005-09-05 18:42 ` John Dangler
  2005-09-05 20:17 ` q-parser
  1 sibling, 0 replies; 4+ messages in thread
From: John Dangler @ 2005-09-05 18:42 UTC (permalink / raw
  To: gentoo-user

It turns out that this (and probably the OP’s problem as well) isn’t related
to Apache at all, but a networking issue.
As long as the /etc/hosts files match on both machines, all is well…
It also turns out that, even though deprecated in the RFC’s, an underscore
is not legal in a virtual host name.
Thanks to sub on the IRC channels for the input!

John D

-----Original Message-----
From: John Dangler [mailto:jdangler@atlantic.net] 
Sent: Monday, September 05, 2005 12:05 PM
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Apache vhosts revisited
Importance: High

After going back through the entire thread dealing with the vhosts problem
that was running here recently, I tried to setup my local fileserver with
the ‘default’ apache server, and adding 1 virtual host.
 
my apache2.conf file is basically a default (out of the box) setup, with the
line
Include conf/vhosts/vhsots.conf uncommented so that it is included.
 
my vhosts.conf file has
<NameVirtualHost 192.168.1.36:80>
 
<VirtualHost 192.168.1.36:80>
  ServerName Mambo
  DocumentRoot /var/www/localhost/htdocs>
</VirtualHost>
 
<VirtualHost 192.168.1.36:80>
  ServerName GenoFit
  DocumentRoot /usr2/genofit/public
  <Driectory /usr2/genofit/public>
    order deny,allow
    Allow from all
    AllowOverride All
    Options FollowSymLinks
  </Directory>
</VirtualHost>
 
from the local machine, both hosts are accessible.
from another machine on the same router (192.168.1.35):
browsing to 192.168.1.36 gives me the Apache default page.
browsing to 192.168.1.36/GenoFit gives me “Not Found” The requested URL
/GenoFit was not found on the server
browsing to 192.168.1.36/Mambo gives me “Not Found” The requested URL /Mambo
was not found on the server
 
ping works in both directions, so I’m sure that it’s something I did/didn’t
do correctly in the config files.
After reading through the wiki docs on virtual hosts, and the docs on the
apache site (which are a little harder to digest), I think that the vhosts
file is ok, but I’m not sure about the apache2.conf file…
 
Any input is appreciated.
 
John D



-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] Apache vhosts revisited
  2005-09-05 16:04 [gentoo-user] Apache vhosts revisited John Dangler
  2005-09-05 18:42 ` RESOLVED " John Dangler
@ 2005-09-05 20:17 ` q-parser
  2005-09-05 21:48   ` Neil Bothwick
  1 sibling, 1 reply; 4+ messages in thread
From: q-parser @ 2005-09-05 20:17 UTC (permalink / raw
  To: gentoo-user

John Dangler wrote:

> After going back through the entire thread dealing with the vhosts 
> problem that was running here recently, I tried to setup my local 
> fileserver with the ‘default’ apache server, and adding 1 virtual host.
>
> my apache2.conf file is basically a default (out of the box) setup, 
> with the line
>
> Include conf/vhosts/vhsots.conf uncommented so that it is included.
>
> my vhosts.conf file has
>
> <NameVirtualHost 192.168.1.36:80>
>
> <VirtualHost 192.168.1.36:80>
>
> ServerName Mambo
>
> DocumentRoot /var/www/localhost/htdocs>
>
> </VirtualHost>
>
> <VirtualHost 192.168.1.36:80>
>
> ServerName GenoFit
>
> DocumentRoot /usr2/genofit/public
>
> <Driectory /usr2/genofit/public>
>
> order deny,allow
>
> Allow from all
>
> AllowOverride All
>
> Options FollowSymLinks
>
> </Directory>
>
> </VirtualHost>
>
> from the local machine, both hosts are accessible.
>
> from another machine on the same router (192.168.1.35):
>
> browsing to 192.168.1.36 gives me the Apache default page.
>
> browsing to 192.168.1.36/GenoFit gives me “Not Found” The requested 
> URL /GenoFit was not found on the server
>
> browsing to 192.168.1.36/Mambo gives me “Not Found” The requested URL 
> /Mambo was not found on the server
>
> ping works in both directions, so I’m sure that it’s something I 
> did/didn’t do correctly in the config files.
>
> After reading through the wiki docs on virtual hosts, and the docs on 
> the apache site (which are a little harder to digest), I think that 
> the vhosts file is ok, but I’m not sure about the apache2.conf file…
>
> Any input is appreciated.
>
> John D
>
I don't see much into this, but will it not be in confict if you use the 
same IP and port for 2 ServerNames? I would use different ports for 
these two webs instead.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] Apache vhosts revisited
  2005-09-05 20:17 ` q-parser
@ 2005-09-05 21:48   ` Neil Bothwick
  0 siblings, 0 replies; 4+ messages in thread
From: Neil Bothwick @ 2005-09-05 21:48 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 788 bytes --]

On Mon, 05 Sep 2005 22:17:15 +0200, q-parser wrote:

> I don't see much into this, but will it not be in confict if you use
> the same IP and port for 2 ServerNames?

No, this is how name based virtual hosting works. The browser sends a
host: header with the request, Apache uses this to determine which
virtual host to use to serve the content. It is possible to serve
thousands of hosts from a single port and IP address.

See the commented vhost config files and the documentation for a more
complete explanation.

> I would use different ports for 
> these two webs instead.

That would require visitors to type a port number as well as the URI,
something most web users are not accustomed to.


-- 
Neil Bothwick

Are you using Windows or is that just an XT?

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-09-05 21:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-05 16:04 [gentoo-user] Apache vhosts revisited John Dangler
2005-09-05 18:42 ` RESOLVED " John Dangler
2005-09-05 20:17 ` q-parser
2005-09-05 21:48   ` Neil Bothwick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox