You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by robert rottermann <ro...@redcor.ch> on 2009/09/14 22:21:21 UTC

[users@httpd] virtualhosts: the default VH gets all trafic. why??

Hi there,

I have a problem using VH's.

I updated a linx box to SuSe 11.1 with apache 2.2.10

I have there VHosts but all the traffic goes to the first one.

could anybody point me to my error?

thanks
robert


alice:~ # httpd2 -V
Server version: Apache/2.2.13 (Linux/SUSE)
Server built:   Aug 10 2009 03:18:06
Server's Module Magic Number: 20051115:23
Server loaded:  APR 1.3.8, APR-Util 1.3.4
Compiled using: APR 1.3.8, APR-Util 1.3.9
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
..

these are the VH definitions
----------------------------

# energie-cluster
# -------------------
#_robert_
<VirtualHost *:80>
    DocumentRoot /srv/www/htdocs/

    ServerAdmin robert@redcor.net
    ServerName  www.energie-cluster.ch
    CustomLog     /var/log/apache2/energie-cluster-access.log combined
    ErrorLog      /var/log/apache2/energie-cluster-error.log
    LogLevel warn

    # don't loose time with IP address lookups
    HostnameLookups Off

    # needed for named virtual hosts
    UseCanonicalName Off

    # configures the footer on server-generated documents
    ServerSignature On

    RewriteEngine On

    # use #RewriteLog to debug problems with your rewrite rules
    # disable it after you found the error our your harddisk will be filled
*very fast*
    #RewriteLog "/var/log/apache2/rewrite_log"
    #RewriteLogLevel 2

    RewriteRule /(.*)/$
http://127.0.0.1:8180/VirtualHostBase/http/www.energie-cluster.ch:80/ecweb/ecweb/web/VirtualHostRoot/$1
[L,P]
    RewriteRule ^/(.*)
http://127.0.0.1:8180/VirtualHostBase/http/www.energie-cluster.ch:80/ecweb/ecweb/web/VirtualHostRoot/$1
[L,P]
</VirtualHost>


# plattformen
# -------------------
#_robert_
<VirtualHost *:80>
    DocumentRoot /srv/www/htdocs/

    ServerAdmin robert@redcor.net
    ServerName  www.energie-plattform.ch
    CustomLog     /var/log/apache2/plattform-access.log combined
    ErrorLog      /var/log/apache2/plattform-error.log
    LogLevel warn

    # don't loose time with IP address lookups
    HostnameLookups Off

    # needed for named virtual hosts
    UseCanonicalName Off

    # configures the footer on server-generated documents
    ServerSignature On

    RewriteEngine On

    # use #RewriteLog to debug problems with your rewrite rules
    # disable it after you found the error our your harddisk will be filled
*very fast*
    #RewriteLog "/var/log/apache2/rewrite_log"
    #RewriteLogLevel 2

    RewriteRule /(.*)/$
http://127.0.0.1:8180/VirtualHostBase/http/www.energie-plattform.ch:80/declarations/declarations/VirtualHostRoot/$1
[L,P]
    RewriteRule ^/(.*)
http://127.0.0.1:8180/VirtualHostBase/http/www.energie-plattform.ch:80/declarations/declarations/VirtualHostRoot/$1
[L,P]

</VirtualHost>




# www.aerztenetzbern.ch
# ---------------------
#_robert_
<VirtualHost *:80>
    DocumentRoot /srv/www/htdocs/

    ServerAdmin robert@redcor.net
    ServerName  www.aerztenetzbern.ch
    ServerAlias www.aenbe.ch
    ServerAlias .*aerztenetzwerkbern.ch
    ServerAlias .*aenb.ch
    CustomLog     /var/log/apache2/aenebe-access.log combined
    ErrorLog      /var/log/apache2/aenebe-error.log
    LogLevel warn

    # don't loose time with IP address lookups
    HostnameLookups Off

    # needed for named virtual hosts
    UseCanonicalName Off

    # configures the footer on server-generated documents
    ServerSignature On

    RewriteEngine On

    # use #RewriteLog to debug problems with your rewrite rules
    # disable it after you found the error our your harddisk will be filled
*very fast*
    #RewriteLog "/var/log/apache2/rewrite_log"
    #RewriteLogLevel 2

    RewriteRule /(.*)/$
http://127.0.0.1:10183/VirtualHostBase/http/www.aerztenetzbern.ch:80/aenebe/VirtualHostRoot/$1
[L,P]
    RewriteRule ^/(.*)
http://127.0.0.1:10183/VirtualHostBase/http/www.aerztenetzbern.ch:80/aenebe/VirtualHostRoot/$1
[L,P]

</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] virtualhosts: the default VH gets all trafic. why??

Posted by robert rottermann <ro...@redcor.ch>.
Eric Covener schrieb:
> On Mon, Sep 14, 2009 at 4:21 PM, robert rottermann <ro...@redcor.ch> wrote:
>> Hi there,
>>
>> I have a problem using VH's.
>>
>> I updated a linx box to SuSe 11.1 with apache 2.2.10
>>
>> I have there VHosts but all the traffic goes to the first one.
> 
> NameVirtualHost *:80 would be required to treat those as name-based
> virtual hosts.
> 
> httpd2 -S might have given a better hint.
> 

that was it..

thanks a lot
robert

---------------------------------------------------------------------
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] virtualhosts: the default VH gets all trafic. why??

Posted by Eric Covener <co...@gmail.com>.
On Mon, Sep 14, 2009 at 4:21 PM, robert rottermann <ro...@redcor.ch> wrote:
> Hi there,
>
> I have a problem using VH's.
>
> I updated a linx box to SuSe 11.1 with apache 2.2.10
>
> I have there VHosts but all the traffic goes to the first one.

NameVirtualHost *:80 would be required to treat those as name-based
virtual hosts.

httpd2 -S might have given a better hint.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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] virtualhosts: the default VH gets all trafic. why??

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Eric Covener wrote:
> On Mon, Sep 14, 2009 at 4:37 PM, André Warnier <aw...@ice-sa.com> wrote:
>> robert rottermann wrote:
>>
>> ...
>> Nothing to do with your problem, but is the following normal/safe ?
>>
>> Server loaded:  APR 1.3.8, APR-Util 1.3.4
>> Compiled using: APR 1.3.8, APR-Util 1.3.9
>>
>> (I mean compiling with APR-Util 1.3.9 but running with a lower version)
> 
> Yes, this compatibility is promised by APR versioning rules.

Although a host of bugfixes are lost by degrading from .9 to .4, not good.

---------------------------------------------------------------------
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] virtualhosts: the default VH gets all trafic. why??

Posted by Eric Covener <co...@gmail.com>.
On Mon, Sep 14, 2009 at 4:37 PM, André Warnier <aw...@ice-sa.com> wrote:
> robert rottermann wrote:
>
> ...
> Nothing to do with your problem, but is the following normal/safe ?
>
> Server loaded:  APR 1.3.8, APR-Util 1.3.4
> Compiled using: APR 1.3.8, APR-Util 1.3.9
>
> (I mean compiling with APR-Util 1.3.9 but running with a lower version)

Yes, this compatibility is promised by APR versioning rules.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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] virtualhosts: the default VH gets all trafic. why??

Posted by robert rottermann <ro...@redcor.ch>.
André Warnier schrieb:
> robert rottermann wrote:
> 
> ...
> Nothing to do with your problem, but is the following normal/safe ?
> 
> Server loaded:  APR 1.3.8, APR-Util 1.3.4
> Compiled using: APR 1.3.8, APR-Util 1.3.9
> 
> (I mean compiling with APR-Util 1.3.9 but running with a lower version)
thanks for the hint
I'll look into it.

robert

---------------------------------------------------------------------
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] virtualhosts: the default VH gets all trafic. why??

Posted by André Warnier <aw...@ice-sa.com>.
robert rottermann wrote:

...
Nothing to do with your problem, but is the following normal/safe ?

Server loaded:  APR 1.3.8, APR-Util 1.3.4
Compiled using: APR 1.3.8, APR-Util 1.3.9

(I mean compiling with APR-Util 1.3.9 but running with a lower version)


---------------------------------------------------------------------
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