PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.unix > Virtual domains with apache on SuSE
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

Virtual domains with apache on SuSE

Réponse
 
LinkBack Outils de la discussion
Vieux 12/07/2005, 05h38   #1
bronto
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Virtual domains with apache on SuSE

I am getting a new server setup using SuSE 9.2 and mostly standard
components from the suse distro, including apache2.

I am trying to get virtual hosts set up, using the standard method, not
automatic virtual hosts. Sites need to be identified by host, not IP.
In other words, I need to be able to designate a site path anywhere on
the system, not necessarily only subdirectories within one directory.
I've read through the docs here:
http://httpd.apache.org/docs-2.0/vhosts/name-based.html

Originally, mod_vhost_alias was enabled; my understanding is that's for
the automatic virtual hosts, and I've disabled it. UseCanonicalName is
off. NameVirtualHost is set to my only IP address.

The default server's path is:
DocumentRoot /srv/www/htdocs

virtual host 1 is:
<VirtualHost *>
DocumentRoot /home/vhost1/public_html
ServerName "vhost1.subdom.csd-bes.net"
<Directory "/home/vhost1/public_html">
allow from all
Options +Indexes
UseCanonicalName off
</Directory>
</VirtualHost>

virtual host 2 is:
<VirtualHost *>
DocumentRoot /home/vhost2/public_html
ServerName "vhost2.subdom.csd-bes.net"
<Directory "/home/vhost2/public_html">
allow from all
Options +Indexes
UseCanonicalName off
</Directory>
</VirtualHost>

In this configuration, all sites resolve to the vhost1 path. If I
supply the specific IP address for vhost1 in the config above, all
sites resolve to the vhost2 path. If I supply the IP address to both
vhosts, all sites resolve to the default path.

What's going on here?

  Réponse avec citation
Vieux 12/07/2005, 06h41   #2
David Efflandt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Virtual domains with apache on SuSE

On 11 Jul 2005 21:38:12 -0700, bronto <bronto@csd-bes.net> wrote:
> I am getting a new server setup using SuSE 9.2 and mostly standard
> components from the suse distro, including apache2.
>
> I am trying to get virtual hosts set up, using the standard method, not
> automatic virtual hosts. Sites need to be identified by host, not IP.
> In other words, I need to be able to designate a site path anywhere on
> the system, not necessarily only subdirectories within one directory.
> I've read through the docs here:
> http://httpd.apache.org/docs-2.0/vhosts/name-based.html
>
> Originally, mod_vhost_alias was enabled; my understanding is that's for
> the automatic virtual hosts, and I've disabled it. UseCanonicalName is
> off. NameVirtualHost is set to my only IP address.
>
> The default server's path is:
> DocumentRoot /srv/www/htdocs
>
> virtual host 1 is:
><VirtualHost *>
> DocumentRoot /home/vhost1/public_html
> ServerName "vhost1.subdom.csd-bes.net"
><Directory "/home/vhost1/public_html">
> allow from all
> Options +Indexes
> UseCanonicalName off
></Directory>
></VirtualHost>
>
> virtual host 2 is:
><VirtualHost *>
> DocumentRoot /home/vhost2/public_html
> ServerName "vhost2.subdom.csd-bes.net"
><Directory "/home/vhost2/public_html">
> allow from all
> Options +Indexes
> UseCanonicalName off
></Directory>
></VirtualHost>
>
> In this configuration, all sites resolve to the vhost1 path. If I
> supply the specific IP address for vhost1 in the config above, all
> sites resolve to the vhost2 path. If I supply the IP address to both
> vhosts, all sites resolve to the default path.
>
> What's going on here?


Is the public IP used in NameVirtualHost actually on this computer? If
the server is behind NAT or dynamic IP, you would likely need to use
wildcard NameVirtualHost *

I also had to use a bogus main ServerName, but that may be because my
default vhost is a nameless worm trap, and when main ServerName matched
one of my vhosts, things did not work right.

Also check if anything in /etc/hosts might be throwing things off course
if any of the names or IP are listed there.
  Réponse avec citation
Vieux 12/07/2005, 06h41   #3
David Efflandt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Virtual domains with apache on SuSE

On 11 Jul 2005 21:38:12 -0700, bronto <bronto@csd-bes.net> wrote:
> I am getting a new server setup using SuSE 9.2 and mostly standard
> components from the suse distro, including apache2.
>
> I am trying to get virtual hosts set up, using the standard method, not
> automatic virtual hosts. Sites need to be identified by host, not IP.
> In other words, I need to be able to designate a site path anywhere on
> the system, not necessarily only subdirectories within one directory.
> I've read through the docs here:
> http://httpd.apache.org/docs-2.0/vhosts/name-based.html
>
> Originally, mod_vhost_alias was enabled; my understanding is that's for
> the automatic virtual hosts, and I've disabled it. UseCanonicalName is
> off. NameVirtualHost is set to my only IP address.
>
> The default server's path is:
> DocumentRoot /srv/www/htdocs
>
> virtual host 1 is:
><VirtualHost *>
> DocumentRoot /home/vhost1/public_html
> ServerName "vhost1.subdom.csd-bes.net"
><Directory "/home/vhost1/public_html">
> allow from all
> Options +Indexes
> UseCanonicalName off
></Directory>
></VirtualHost>
>
> virtual host 2 is:
><VirtualHost *>
> DocumentRoot /home/vhost2/public_html
> ServerName "vhost2.subdom.csd-bes.net"
><Directory "/home/vhost2/public_html">
> allow from all
> Options +Indexes
> UseCanonicalName off
></Directory>
></VirtualHost>
>
> In this configuration, all sites resolve to the vhost1 path. If I
> supply the specific IP address for vhost1 in the config above, all
> sites resolve to the vhost2 path. If I supply the IP address to both
> vhosts, all sites resolve to the default path.
>
> What's going on here?


Is the public IP used in NameVirtualHost actually on this computer? If
the server is behind NAT or dynamic IP, you would likely need to use
wildcard NameVirtualHost *

I also had to use a bogus main ServerName, but that may be because my
default vhost is a nameless worm trap, and when main ServerName matched
one of my vhosts, things did not work right.

Also check if anything in /etc/hosts might be throwing things off course
if any of the names or IP are listed there.
  Réponse avec citation
Vieux 12/07/2005, 07h06   #4
bronto
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Virtual domains with apache on SuSE

That's it! Thanks

I am setting this server up at home prior to installing it in the data
center, and I have it sitting behind a Netgear, which is NAT, I
believe.

Problem solved.

  Réponse avec citation
Vieux 12/07/2005, 07h06   #5
bronto
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Virtual domains with apache on SuSE

That's it! Thanks

I am setting this server up at home prior to installing it in the data
center, and I have it sitting behind a Netgear, which is NAT, I
believe.

Problem solved.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 12h34.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,14566 seconds with 13 queries