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 > SuSe 9.3, Yast, Apache and Virtual hosts - Is it borked?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

SuSe 9.3, Yast, Apache and Virtual hosts - Is it borked?

Réponse
 
LinkBack Outils de la discussion
Vieux 18/07/2005, 18h21   #1
Des
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut SuSe 9.3, Yast, Apache and Virtual hosts - Is it borked?

As a novice to Apache, I am trying to setup Virtual hosts on a 'fresh'
Suse 9.3 installation. The 9.3 is fully patched as of today.

Short question: Has anybody successfully used Yast to setup virtual
hosts on suse 9.3 using apache 2?

The apache2 docs says that when you want to add a virtual site to a
single non-virtual site, one has to create an additional virtual entry
for the previous site. Ie. two virtual entries are needed.
http://httpd.apache.org/docs-2.0/vho...ml#page-header

However, when I add a virtual site via Yast, I can see in
/etc/apache2/vhosts.d/yast2_vhosts.conf:
---------------------------------
<VirtualHost 192.168.0.13>
# YaST auto define section
<IfDefine SSL>
SSLEngine off
</IfDefine>
DocumentRoot /srv/www/webs/ola
ServerName webs-ola.localdomain
ServerAdmin admin@localhost
# YaST created entry
<Directory "/srv/www/webs/ola">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
--------------------

As you can see, there is no sign of a VirtualHost entry for the
original server, just the new virtual host. I have 'grep'd' the
/etc/apache2 directory and there is no <VirtualHost> entry in any
other file.

Using 'httpd2 -S' gives:
-----------------------------
VirtualHost configuration:
192.168.0.13:* is a NameVirtualHost
default server webs-ola.localdomain
(/etc/apache2/vhosts.d/yast2_vhosts.conf:1)
port * namevhost webs-ola.localdomain
(/etc/apache2/vhosts.d/yast2_vhosts.conf:1)
Syntax OK
--------------------------

Again, no sign of the original server.

Do I have to explicitly define a second VirtualHost entry
corresponding to the 'original' server - this is what I would have
attempted in the absence of yast, or is there some Yast trick I'm
missing - which begs the question, 'what's the point of
/etc/apache2/default-server.conf?

I'm loath to give up on Yast just yet, as I will have to defend my
config from it for ever more, but I seem to spend more persuading yast
than anything else.

Can anyone ?

--
Cheers, Des
  Réponse avec citation
Vieux 19/07/2005, 01h35   #2
David Efflandt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SuSe 9.3, Yast, Apache and Virtual hosts - Is it borked?

On Mon, 18 Jul 2005 17:21:50 +0100, Des <des@oregon.nOSPamPlz.org.uk> wrote:
> As a novice to Apache, I am trying to setup Virtual hosts on a 'fresh'
> Suse 9.3 installation. The 9.3 is fully patched as of today.
>
> Short question: Has anybody successfully used Yast to setup virtual
> hosts on suse 9.3 using apache 2?
>
> The apache2 docs says that when you want to add a virtual site to a
> single non-virtual site, one has to create an additional virtual entry
> for the previous site. Ie. two virtual entries are needed.
> http://httpd.apache.org/docs-2.0/vho...ml#page-header
>
> However, when I add a virtual site via Yast, I can see in
> /etc/apache2/vhosts.d/yast2_vhosts.conf:
> ---------------------------------
><VirtualHost 192.168.0.13>
> # YaST auto define section
> <IfDefine SSL>
> SSLEngine off
> </IfDefine>
> DocumentRoot /srv/www/webs/ola
> ServerName webs-ola.localdomain
> ServerAdmin admin@localhost
> # YaST created entry
> <Directory "/srv/www/webs/ola">
> Options None
> AllowOverride None
> Order allow,deny
> Allow from all
> </Directory>
></VirtualHost>
> --------------------
>
> As you can see, there is no sign of a VirtualHost entry for the
> original server, just the new virtual host. I have 'grep'd' the
> /etc/apache2 directory and there is no <VirtualHost> entry in any
> other file.


I have not used YaST to create vitual hosts. I just created a vhost.conf
that was defined in /etc/sysconfig/apache as:

HTTPD_CONF_INCLUDE_FILES="/etc/httpd/vhost.conf"

And yes, for NameVirtualHost, you do need a VirtualHost entry for each
virtual host, since there will be no main host in that case. You
apparently read that you needed 2, but only added 1 so far.

Note that when using NameVirtualHost, the first vhost listed will be the
default if no other vhost is matched. So set up the first one in the list
like your main host would be.
  Réponse avec citation
Vieux 19/07/2005, 01h35   #3
David Efflandt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SuSe 9.3, Yast, Apache and Virtual hosts - Is it borked?

On Mon, 18 Jul 2005 17:21:50 +0100, Des <des@oregon.nOSPamPlz.org.uk> wrote:
> As a novice to Apache, I am trying to setup Virtual hosts on a 'fresh'
> Suse 9.3 installation. The 9.3 is fully patched as of today.
>
> Short question: Has anybody successfully used Yast to setup virtual
> hosts on suse 9.3 using apache 2?
>
> The apache2 docs says that when you want to add a virtual site to a
> single non-virtual site, one has to create an additional virtual entry
> for the previous site. Ie. two virtual entries are needed.
> http://httpd.apache.org/docs-2.0/vho...ml#page-header
>
> However, when I add a virtual site via Yast, I can see in
> /etc/apache2/vhosts.d/yast2_vhosts.conf:
> ---------------------------------
><VirtualHost 192.168.0.13>
> # YaST auto define section
> <IfDefine SSL>
> SSLEngine off
> </IfDefine>
> DocumentRoot /srv/www/webs/ola
> ServerName webs-ola.localdomain
> ServerAdmin admin@localhost
> # YaST created entry
> <Directory "/srv/www/webs/ola">
> Options None
> AllowOverride None
> Order allow,deny
> Allow from all
> </Directory>
></VirtualHost>
> --------------------
>
> As you can see, there is no sign of a VirtualHost entry for the
> original server, just the new virtual host. I have 'grep'd' the
> /etc/apache2 directory and there is no <VirtualHost> entry in any
> other file.


I have not used YaST to create vitual hosts. I just created a vhost.conf
that was defined in /etc/sysconfig/apache as:

HTTPD_CONF_INCLUDE_FILES="/etc/httpd/vhost.conf"

And yes, for NameVirtualHost, you do need a VirtualHost entry for each
virtual host, since there will be no main host in that case. You
apparently read that you needed 2, but only added 1 so far.

Note that when using NameVirtualHost, the first vhost listed will be the
default if no other vhost is matched. So set up the first one in the list
like your main host would be.
  Réponse avec citation
Vieux 22/07/2005, 23h02   #4
Des
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SuSe 9.3, Yast, Apache and Virtual hosts - Is it borked?

On Mon, 18 Jul 2005 23:35:24 +0000 (UTC), efflandt@xnet.com (David
Efflandt) wrote:

>On Mon, 18 Jul 2005 17:21:50 +0100, Des <des@oregon.nOSPamPlz.org.uk> wrote:
>> As a novice to Apache, I am trying to setup Virtual hosts on a 'fresh'
>> Suse 9.3 installation. The 9.3 is fully patched as of today.
>>
>> Short question: Has anybody successfully used Yast to setup virtual
>> hosts on suse 9.3 using apache 2?
>>



>
>I have not used YaST to create vitual hosts. I just created a vhost.conf
>that was defined in /etc/sysconfig/apache as:
>
>HTTPD_CONF_INCLUDE_FILES="/etc/httpd/vhost.conf"
>
>And yes, for NameVirtualHost, you do need a VirtualHost entry for each
>virtual host, since there will be no main host in that case. You
>apparently read that you needed 2, but only added 1 so far.
>
>Note that when using NameVirtualHost, the first vhost listed will be the
>default if no other vhost is matched. So set up the first one in the list
>like your main host would be.


Thanks, I will have at look at that approach. In the end, I found it
easier to use the vconf template files in the /etc/apache2/vhost
directory. It appears that the standard httpd.conf files includes any
*.conf it finds in the ./vhosts directory, so I just knocked up a
couple of these for the two domains and everything started to behave.

Although this skips the direct Yast configuration method, at least it
is sympathetic to the approach used in SuSE. Hopefully, this should
survive any future upgrade.

Thanks for the reply.


--
Cheers, Des
  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 02h57.


É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,12857 seconds with 12 queries