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 2010/12/24 04:49:22 UTC
[users@httpd] ProxyPass and problem with VHosts
Now it works partialy and requeests are forwarded but there is a problem
with the config.
On the Gateway-Router I have:
----[ '/srv/APACHE_available/www.tdipmedia.net' ]-----------------------
<VirtualHost 192.168.0.69:80>
ServerAdmin hostmaster@tamay-dogan.net
ServerName www.tdipmedia.net
ProxyRequests off
ProxyVia on
ProxyPass / http://192.168.0.208/
ProxyPassReverse / http://192.168.0.208/
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
</VirtualHost>
------------------------------------------------------------------------
and on the Server:
----[ '/srv/APACHE_available/vserver08.tamay-dogan.net' ]---------------
NameVirtualHost 192.168.0.208:80
<VirtualHost 192.168.0.208:80>
ServerAdmin hostmaster@tamay-dogan.net
ServerName vserver08.tamay-dogan.net
DocumentRoot /VServer_08/htdocs/
<Directory />
Options FollowSymLinks Indexes
AllowOverride None
</Directory>
</VirtualHost>
------------------------------------------------------------------------
----[ '/srv/APACHE_available/www.tdipmedia.net' ]-----------------------
<VirtualHost 192.168.0.208:80>
ServerAdmin michelle.konzack@tamay-dogan.net
ServerName www.tdipmedia.net
DocumentRoot /VServer_08/CONFIG_www.tdipmedia.net/htdocs/
<Directory />
Options FollowSymLinks Indexes
AllowOverride None
</Directory>
</VirtualHost>
------------------------------------------------------------------------
Now if I check with an index.php where I am I get always
SERVER_NAME 192.168.0.208
HTTP_HOST 192.168.0.208
and never the requested VHost-Name.
Any requests go to /VServer_08/htdocs/.
How can I correct this?
Note: I have more then one VHost on it.
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] [SOLVED] Re: ProxyPass and problem with VHosts
Posted by Michelle Konzack <li...@tamay-dogan.net>.
Grmpf On
ProxyPreserveHost On
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/
[users@httpd] Re: Searchin better solution as mod_proxy/vhost
Posted by Michelle Konzack <li...@tamay-dogan.net>.
Hello Joost de Heer,
Am 2010-12-29 22:15:56, hacktest Du folgendes herunter:
> With mod_rewrite and rewritemap. It should look something like this
> (untested):
>
> urlmap.txt [textfile]
> host1 ip1
> host2 ip2
> host3 ip3
>
> httpd.conf:
> RewriteEngine On
> RewriteMap urlmap txt:/path/to/urlmap.txt
> # Only rewrite if there is a host header
> RewriteCond %{HTTP_HOST} !^$
> # Lowercase the hostheader
> RewriteCond ${lowercase:%{HTTP_HOST}} ^(.+)$
> # Rewrite only if there is an entry in the urlmap
> RewriteCond ${urlmap:%1} ^([0-9].*)$
> RewriteRule /(.*) http://%1/$1 [P,L]
Thank you Joost. This was I have tried but not gotten it to work
> 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] Searchin better solution as mod_proxy/vhost
Posted by Joost de Heer <jo...@sanguis.xs4all.nl>.
On 29-12-2010 20:00, Michelle Konzack wrote:
> Hello *,
>
> On my gateway I use a bunch of files (currently 1782) like
>
> ----8<------------------------------------------------------
> <VirtualHost 88.168.69.36:80>
> ServerName $HOST_NAME
>
> ProxyRequests off
> ProxyVia on
> ProxyPass / http://$HOST_IP/
> ProxyPassReverse / http://$HOST_IP/
> ProxyPreserveHost on
> <Proxy *>
> Order deny,allow
> Allow from all
> </Proxy>
> </VirtualHost>
> ----8<------------------------------------------------------
>
> and it works perfectly, but i disike the memory consumation of apache2.2
> so, my question is:
> How can I do this better?
With mod_rewrite and rewritemap. It should look something like this
(untested):
urlmap.txt [textfile]
host1 ip1
host2 ip2
host3 ip3
.
.
.
httpd.conf:
RewriteEngine On
RewriteMap urlmap txt:/path/to/urlmap.txt
# Only rewrite if there is a host header
RewriteCond %{HTTP_HOST} !^$
# Lowercase the hostheader
RewriteCond ${lowercase:%{HTTP_HOST}} ^(.+)$
# Rewrite only if there is an entry in the urlmap
RewriteCond ${urlmap:%1} ^([0-9].*)$
RewriteRule /(.*) http://%1/$1 [P,L]
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] Searchin better solution as mod_proxy/vhost
Posted by Michelle Konzack <li...@tamay-dogan.net>.
Hello *,
On my gateway I use a bunch of files (currently 1782) like
----8<------------------------------------------------------
<VirtualHost 88.168.69.36:80>
ServerName $HOST_NAME
ProxyRequests off
ProxyVia on
ProxyPass / http://$HOST_IP/
ProxyPassReverse / http://$HOST_IP/
ProxyPreserveHost on
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
</VirtualHost>
----8<------------------------------------------------------
and it works perfectly, but i disike the memory consumation of apache2.2
so, my question is:
How can I do this better?
Note: I have a file with the config of
$HOST_NAME<TAB>$HOST_IP
which can be used to determiner where to redirect VHosts
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/