You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Michelle Konzack <li...@tamay-dogan.net> on 2011/01/03 03:41:53 UTC
[users@httpd] wildcard domains do not work
Hello,
while following script which remove the TILDE is working
----[ '/srv/APACHE_enabled/samba3.private.tamay-dogan.net' ]------------
<VirtualHost 192.168.0.69:80>
ServerName samba3.private.tamay-dogan.net
<snip>
RewriteEngine On
RewriteCond /home/$1 -d
RewriteRule ^/([^/]+)/(.*) /home/$1/public_html/$2
<snip>
</VirtualHost>
------------------------------------------------------------------------
except I like to have a "RedirectMatch 301 ..." which I do not know how
it works, I have problems remaping the "public_home" directories to
dynamic sites using
----[ '/srv/APACHE_conf.d/10_dynamic_virtual_hosts' ]-------------------
########################################################################
#
# http://wiki.apache.org/httpd/RewriteVhosts
#
# Dynamic virtual hosts
#
# You want to have each user on your system automatically have
# username.domain.com mapped to their home directory.
#
########################################################################
RewriteEngine On
# Skip www\.home\.tamay-dogan\.net
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} ^([^.]+)\.home\.tamay-dogan\.net
RewriteRule ^/(.*)$ /home/%1/public_html/$1 [L]
------------------------------------------------------------------------
I am landing every time on the default VHost from the Server which is
not configured. However, the VHost <http://www.home.tamay-dogan.net/>
is working.
Why does the rest not become remaped?
Thanks, Greetings and nice Day/Evening
Michelle Konzack
--
##################### Debian GNU/Linux Consultant ######################
Development of Intranet and Embedded Systems with Debian GNU/Linux
itsystems@tdnet France EURL itsystems@tdnet UG (limited liability)
Owner Michelle Konzack Owner Michelle Konzack
Apt. 917 (homeoffice)
50, rue de Soultz Kinzigstraße 17
67100 Strasbourg/France 77694 Kehl/Germany
Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix
<http://www.itsystems.tamay-dogan.net/> <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/> <http://www.can4linux.org/>
Jabber linux4michelle@jabber.ccc.de
Linux-User #280138 with the Linux Counter, http://counter.li.org/
[users@httpd] Re: Re: wildcard domains do not work
Posted by Michelle Konzack <li...@tamay-dogan.net>.
Hello Igor Galić,
Am 2011-01-04 00:37:23, hacktest Du folgendes herunter:
> How are these dynamic homepage vhosts(?) generated?
I have setup "bind9" to wildcard <*.home.tamay-dogan.net/> to my IP and
let apache do the rest. Speak, currently anything replacing the "*" will
go to the default host.
> Separate vhost each? VHosting via mod_rewrite *shudder*
> mod_vhost_alias?
Ehm?
> RewriteRules are not inherited by default.
> This can only be done via RewriteOptions inherit in the
> child context.
Thanks, Greetings and nice Day/Evening
Michelle Konzack
--
##################### Debian GNU/Linux Consultant ######################
Development of Intranet and Embedded Systems with Debian GNU/Linux
itsystems@tdnet France EURL itsystems@tdnet UG (limited liability)
Owner Michelle Konzack Owner Michelle Konzack
Apt. 917 (homeoffice)
50, rue de Soultz Kinzigstraße 17
67100 Strasbourg/France 77694 Kehl/Germany
Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix
<http://www.itsystems.tamay-dogan.net/> <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/> <http://www.can4linux.org/>
Jabber linux4michelle@jabber.ccc.de
ICQ #328449886
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Re: [users@httpd] Re: wildcard domains do not work
Posted by Igor Galić <i....@brainsware.org>.
----- "Michelle Konzack" <li...@tamay-dogan.net> wrote:
> Hello Joost de Heer,
>
> Am 2011-01-03 08:58:06, hacktest Du folgendes herunter:
> > > RewriteCond /home/$1 -d
> > > RewriteRule ^/([^/]+)/(.*) /home/$1/public_html/$2
> > > <snip>
> > [R=301] behind the RewriteRule.
>
> This does not work.
> While
> <http://www.home.tamay-dogan.net/~michelle.konzack>
>
> is working, the following two are not:
>
> <http://www.home.tamay-dogan.net/michelle.konzack>
> <http://www.home.tamay-dogan.net/michelle.konzack/>
>
> the second on give a
> 404 Not Found
>
> <http://www.home.tamay-dogan.net/home/michelle.konzack/public_html/>
>
> > > RewriteEngine On
> > >
> > > # Skip www\.home\.tamay-dogan\.net
> > > RewriteCond %{HTTP_HOST} !^www\.
> > >
> > > RewriteCond %{HTTP_HOST} ^([^.]+)\.home\.tamay-dogan\.net
> > > RewriteRule ^/(.*)$ /home/%1/public_html/$1 [L]
> > Rewrite rules aren't inherited automatically, you need
> 'RewriteOptions
> > inherit' in your vhost.
>
> Tried this but it does not work. Otherwise, it would show the
> same
> content as:
> <http://www.home.tamay-dogan.net/~michelle.konzack>
> <http://www.home.tamay-dogan.net/michelle.konzack>
> but
> <http://michelle.konzack.home.tamay-dogan.net/>
>
> is not working and I see the page of my non-configured Intranet
> Server.
>
> > RewriteLog and RewriteLogLevel are useful too.
>
> I have put it in the httpd.conf and see only rewite rules for the
> TILDE
> stuff but not the dynamic homepages. They seems to be ignored.
How are these dynamic homepage vhosts(?) generated?
Separate vhost each? VHosting via mod_rewrite *shudder*
mod_vhost_alias?
RewriteRules are not inherited by default.
This can only be done via RewriteOptions inherit in the
child context.
> > Joost
>
> Thanks, Greetings and nice Day/Evening
> Michelle Konzack
>
> --
> ##################### Debian GNU/Linux Consultant
> ######################
> Development of Intranet and Embedded Systems with Debian GNU/Linux
>
> itsystems@tdnet France EURL itsystems@tdnet UG (limited
> liability)
> Owner Michelle Konzack Owner Michelle Konzack
>
> Apt. 917 (homeoffice)
> 50, rue de Soultz Kinzigstraße 17
> 67100 Strasbourg/France 77694 Kehl/Germany
> Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil
> Tel: +33-9-52705884 fix
>
> <http://www.itsystems.tamay-dogan.net/>
> <http://www.flexray4linux.org/>
> <http://www.debian.tamay-dogan.net/>
> <http://www.can4linux.org/>
>
> Jabber linux4michelle@jabber.ccc.de
> ICQ #328449886
>
> Linux-User #280138 with the Linux Counter, http://counter.li.org/
--
Igor Galić
Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.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
[users@httpd] Re: wildcard domains do not work
Posted by Michelle Konzack <li...@tamay-dogan.net>.
Hello Joost de Heer,
Am 2011-01-03 08:58:06, hacktest Du folgendes herunter:
> > RewriteCond /home/$1 -d
> > RewriteRule ^/([^/]+)/(.*) /home/$1/public_html/$2
> > <snip>
> [R=301] behind the RewriteRule.
This does not work.
While
<http://www.home.tamay-dogan.net/~michelle.konzack>
is working, the following two are not:
<http://www.home.tamay-dogan.net/michelle.konzack>
<http://www.home.tamay-dogan.net/michelle.konzack/>
the second on give a
404 Not Found
<http://www.home.tamay-dogan.net/home/michelle.konzack/public_html/>
> > RewriteEngine On
> >
> > # Skip www\.home\.tamay-dogan\.net
> > RewriteCond %{HTTP_HOST} !^www\.
> >
> > RewriteCond %{HTTP_HOST} ^([^.]+)\.home\.tamay-dogan\.net
> > RewriteRule ^/(.*)$ /home/%1/public_html/$1 [L]
> Rewrite rules aren't inherited automatically, you need 'RewriteOptions
> inherit' in your vhost.
Tried this but it does not work. Otherwise, it would show the same
content as:
<http://www.home.tamay-dogan.net/~michelle.konzack>
<http://www.home.tamay-dogan.net/michelle.konzack>
but
<http://michelle.konzack.home.tamay-dogan.net/>
is not working and I see the page of my non-configured Intranet Server.
> RewriteLog and RewriteLogLevel are useful too.
I have put it in the httpd.conf and see only rewite rules for the TILDE
stuff but not the dynamic homepages. They seems to be ignored.
> Joost
Thanks, Greetings and nice Day/Evening
Michelle Konzack
--
##################### Debian GNU/Linux Consultant ######################
Development of Intranet and Embedded Systems with Debian GNU/Linux
itsystems@tdnet France EURL itsystems@tdnet UG (limited liability)
Owner Michelle Konzack Owner Michelle Konzack
Apt. 917 (homeoffice)
50, rue de Soultz Kinzigstraße 17
67100 Strasbourg/France 77694 Kehl/Germany
Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix
<http://www.itsystems.tamay-dogan.net/> <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/> <http://www.can4linux.org/>
Jabber linux4michelle@jabber.ccc.de
ICQ #328449886
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Re: [users@httpd] wildcard domains do not work
Posted by Joost de Heer <jo...@sanguis.xs4all.nl>.
> RewriteCond /home/$1 -d
> RewriteRule ^/([^/]+)/(.*) /home/$1/public_html/$2
> <snip>
>
> </VirtualHost>
> ------------------------------------------------------------------------
>
> except I like to have a "RedirectMatch 301 ..." which I do not know how
> it works,
[R=301] behind the RewriteRule.
> RewriteEngine On
>
> # Skip www\.home\.tamay-dogan\.net
> RewriteCond %{HTTP_HOST} !^www\.
>
> RewriteCond %{HTTP_HOST} ^([^.]+)\.home\.tamay-dogan\.net
> RewriteRule ^/(.*)$ /home/%1/public_html/$1 [L]
> ------------------------------------------------------------------------
>
> I am landing every time on the default VHost from the Server which is
> not configured. However, the VHost <http://www.home.tamay-dogan.net/>
> is working.
>
> Why does the rest not become remaped?
Rewrite rules aren't inherited automatically, you need 'RewriteOptions
inherit' in your vhost.
RewriteLog and RewriteLogLevel are useful too.
Joost
---------------------------------------------------------------------
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
[users@httpd] Re: Re: Re: wildcard domains do not [MORE] work
Posted by Michelle Konzack <li...@tamay-dogan.net>.
Hello Eric Covener,
Am 2011-04-03 16:04:38, hacktest Du folgendes herunter:
> Hard to guess why without seeing in what context you've set
> PHP-related directives. Have you tried the SetHandler stanza in the
> FAQ?
I have tried both (SetHandler and AddHandler) but not effect.
The problem si, that it was already working on Debian/Lenny and now when
I moved to Debian/Squeeze there are some things screwed up silently.
The Apache and PHP configs where the original from lenny... and PHP had
already killed my properly configured als conf files.
Thanks, Greetings and nice Day/Evening
Michelle Konzack
--
##################### Debian GNU/Linux Consultant ######################
Development of Intranet and Embedded Systems with Debian GNU/Linux
itsystems@tdnet France EURL itsystems@tdnet UG (limited liability)
Owner Michelle Konzack Owner Michelle Konzack
Apt. 917 (homeoffice)
50, rue de Soultz Kinzigstraße 17
67100 Strasbourg/France 77694 Kehl/Germany
Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix
<http://www.itsystems.tamay-dogan.net/> <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/> <http://www.can4linux.org/>
Jabber linux4michelle@jabber.ccc.de
ICQ #328449886
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Re: [users@httpd] Re: Re: wildcard domains do not [MORE] work
Posted by Yehuda Katz <ye...@ymkatz.net>.
On Sun, Apr 3, 2011 at 5:13 PM, Francois Gingras <francois.gingras@gmail.com
> wrote:
> >> Only anything in /home/*/pubic_html is screwed.
> >
> > Hard to guess why without seeing in what context you've set
> > PHP-related directives. Have you tried the SetHandler stanza in the
> > FAQ?
>
IIRC, the debian devs took it upon themselves to 'disable' mod_php in
> user directories (mod_userdir) recently, with some php_ directive. See
> the mod_php docs.
>
It is that way in Ubuntu also.
The place to change that in Ubuntu is /etc/apache2/mods-available/php5.conf
Comment out this part:
<IfModule mod_userdir.c>
<Directory /home/*/public_html>
php_admin_value engine Off
</Directory>
</IfModule>
- Yehuda
[users@httpd] Re: Re: Re: wildcard domains do not [MORE] work
Posted by Michelle Konzack <li...@tamay-dogan.net>.
Hello Francois Gingras,
Am 2011-04-03 17:13:58, hacktest Du folgendes herunter:
> IIRC, the debian devs took it upon themselves to 'disable' mod_php in
> user directories (mod_userdir) recently, with some php_ directive. See
> the mod_php docs.
Fsck! The <IfModuel> part with:
php_admin_value Engine Off
Now I have comment it out and it just works as expected.
> Frank
Thanks, Greetings and nice Day/Evening
Michelle Konzack
--
##################### Debian GNU/Linux Consultant ######################
Development of Intranet and Embedded Systems with Debian GNU/Linux
itsystems@tdnet France EURL itsystems@tdnet UG (limited liability)
Owner Michelle Konzack Owner Michelle Konzack
Apt. 917 (homeoffice)
50, rue de Soultz Kinzigstraße 17
67100 Strasbourg/France 77694 Kehl/Germany
Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix
<http://www.itsystems.tamay-dogan.net/> <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/> <http://www.can4linux.org/>
Jabber linux4michelle@jabber.ccc.de
ICQ #328449886
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Re: [users@httpd] Re: Re: wildcard domains do not [MORE] work
Posted by Francois Gingras <fr...@gmail.com>.
On Sun, Apr 3, 2011 at 4:04 PM, Eric Covener <co...@gmail.com> wrote:
>> The server has clearly send "Content-Type: application/x-httpd-php" and
>> I do not know WHY, because the rewritten DOCROOT are the only one, where
>> it happen. All other VHosts do it right and "Content-Type: text/html"
>> is send.
>
>> Only anything in /home/*/pubic_html is screwed.
>
> Hard to guess why without seeing in what context you've set
> PHP-related directives. Have you tried the SetHandler stanza in the
> FAQ?
>
> ---------------------------------------------------------------------
> 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
>
>
IIRC, the debian devs took it upon themselves to 'disable' mod_php in
user directories (mod_userdir) recently, with some php_ directive. See
the mod_php docs.
Frank
---------------------------------------------------------------------
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] Re: Re: wildcard domains do not [MORE] work
Posted by Eric Covener <co...@gmail.com>.
> The server has clearly send "Content-Type: application/x-httpd-php" and
> I do not know WHY, because the rewritten DOCROOT are the only one, where
> it happen. All other VHosts do it right and "Content-Type: text/html"
> is send.
> Only anything in /home/*/pubic_html is screwed.
Hard to guess why without seeing in what context you've set
PHP-related directives. Have you tried the SetHandler stanza in the
FAQ?
---------------------------------------------------------------------
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
[users@httpd] Re: Re: wildcard domains do not [MORE] work
Posted by Michelle Konzack <li...@tamay-dogan.net>.
Hello Eric Covener,
Am 2011-04-03 09:13:41, hacktest Du folgendes herunter:
> > where an index.php is placed. Apache offer me to download the PHP file.
>
> http://wiki.apache.org/httpd/PHPDownload
I know this already but I get:
----[ command 'wget -S -O - http://tamay.dogan.tdhome.net/' ]-----------
--2011-04-03 17:50:55-- http://tamay.dogan.tdhome.net/
Auflösen des Hostnamen »tamay.dogan.tdhome.net«.... 78.47.247.21
Verbindungsaufbau zu tamay.dogan.tdhome.net|78.47.247.21|:80... verbunden.
HTTP Anforderung gesendet, warte auf Antwort...
HTTP/1.1 200 OK
Date: Sun, 03 Apr 2011 15:50:56 GMT
Server: Apache/2.2.16 (Debian)
Vary: Host
Last-Modified: Sun, 13 Mar 2011 02:26:21 GMT
ETag: "4e034-42-49e53ebb7ad40"
Accept-Ranges: bytes
Content-Length: 66
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: application/x-httpd-php
Länge: 66 [application/x-httpd-php]
In »STDOUT« speichern.
<?php
echo "Default INDEX page of "tamay.dogan".";
?>
0K 100% 6,82M=0s
2011-04-03 17:50:56 (6,82 MB/s) - »-« gespeichert [66/66]
------------------------------------------------------------------------
Browser cache WAS cleared and now the same result with wget?
The server has clearly send "Content-Type: application/x-httpd-php" and
I do not know WHY, because the rewritten DOCROOT are the only one, where
it happen. All other VHosts do it right and "Content-Type: text/html"
is send.
Only anything in /home/*/pubic_html is screwed.
Thanks, Greetings and nice Day/Evening
Michelle Konzack
--
##################### Debian GNU/Linux Consultant ######################
Development of Intranet and Embedded Systems with Debian GNU/Linux
itsystems@tdnet France EURL itsystems@tdnet UG (limited liability)
Owner Michelle Konzack Owner Michelle Konzack
Apt. 917 (homeoffice)
50, rue de Soultz Kinzigstraße 17
67100 Strasbourg/France 77694 Kehl/Germany
Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix
<http://www.itsystems.tamay-dogan.net/> <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/> <http://www.can4linux.org/>
Jabber linux4michelle@jabber.ccc.de
ICQ #328449886
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Re: [users@httpd] Re: wildcard domains do not [MORE] work
Posted by Eric Covener <co...@gmail.com>.
> where an index.php is placed. Apache offer me to download the PHP file.
http://wiki.apache.org/httpd/PHPDownload
---------------------------------------------------------------------
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
[users@httpd] Re: wildcard domains do not [MORE] work
Posted by Michelle Konzack <li...@tamay-dogan.net>.
Hello *,
----[ '/srv/APACHE_available/0_mail.tamay-dogan.net' ]------------------
<VirtualHost 78.47.247.21:80>
ServerAdmin michelle.konzack@tamSPAMogan.net
ServerName mail.tamay-dogan.net
RewriteEngine On
RewriteLogLevel 9
RewriteLog /srv/CONFIG_www.tdhome.net/log/apache/rewrite.log
RewriteOptions inherit
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} ^(.+)\.tdhome\.net
RewriteRule ^/(.*)$ /home/%1/public_html/$1 [L]
DocumentRoot /srv/htdocs
<Directory />
Options FollowSymLinks Indexes
AllowOverride None
</Directory>
# debug, info, notice, warn, error, crit, alert, emerg.
LogLevel warn
ErrorLog /srv/log/apache/error.log
LogFormat "%{[%Y-%m-%d %H:%M:%S %z]}t %h [%V] %l %u \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost
CustomLog /srv/log/apache/access.log vhost
ServerSignature On
</VirtualHost>
------------------------------------------------------------------------
This VHost is like all others, and if I go into
http://michelle.konzack.tdhome.net/
I see my directory listing but if I go to
http://tamay.dogan.tdhome.net/
or
http://www.tdhome.net/~tamay.dogan/
where an index.php is placed. Apache offer me to download the PHP file.
Any suggestions?
Thanks, Greetings and nice Day/Evening
Michelle Konzack
--
##################### Debian GNU/Linux Consultant ######################
Development of Intranet and Embedded Systems with Debian GNU/Linux
itsystems@tdnet France EURL itsystems@tdnet UG (limited liability)
Owner Michelle Konzack Owner Michelle Konzack
Apt. 917 (homeoffice)
50, rue de Soultz Kinzigstraße 17
67100 Strasbourg/France 77694 Kehl/Germany
Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix
<http://www.itsystems.tamay-dogan.net/> <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/> <http://www.can4linux.org/>
Jabber linux4michelle@jabber.ccc.de
ICQ #328449886
Linux-User #280138 with the Linux Counter, http://counter.li.org/