sslug-teknik team mailing list archive
-
sslug-teknik team
-
Mailing list archive
-
Message #99358
Re: virtualhosts i Ubuntu
Er der en måde at få adressernes <test.*> navne med over og fortolket?
kender ikke lige proxypass , men hvis den fjerner information fra http
requests
så må du se i dokumentation til proxypass maskinen.
Apache på du webserver kan i hvertfald ikke trylle det frem igen.
Se evt. i apache log og error filer hvad der kommer frem ved requests.
Kigger på det imorgen. Har sat til log til debug level på begge maskiner.
Leif
For at gøre det færdig:
Så fandt jeg udaf en løsning. Der er sikkert andre hvis man vil
diferensiere hver virtual host.
modproxy bruger som default canonisering af url
----------
error log:
[Thu Oct 22 10:47:16 2009] [debug] proxy_http.c(67): proxy: HTTP:
canonicalising URL //192.168.1.5
--------
man kan sætte et flag [nocanon] i proxypass i hver virtual host
(prøvede det ikke)
---------
eller som jeg, da jeg vil have det samme i alle virtual hosts: indsætte
<ProxyPreserveHost On> efter <NameVirtualHost>- Direktivet sådan:
NameVirtualHost 192.168.1.3:80
ProxyPreserveHost On
Det virkede
----------
læs refence fra http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
ProxyPreserveHost Directive
Description: Use incoming Host HTTP request header for proxy request
Syntax: ProxyPreserveHost On|Off
Default: ProxyPreserveHost Off
Context: server config, virtual host
Status: Extension
Module: mod_proxy
Compatibility: Available in Apache 2.0.31 and later.
When enabled, this option will pass the Host: line from the incoming
request to the proxied host, instead of the hostname specified in the
ProxyPass line.
This option should normally be turned Off. It is mostly useful in
special configurations like proxied mass name-based virtual hosting,
where the original Host header needs to be evaluated by the backend server.
---------
VH Leif
Follow ups
References