httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathijs <mathijs...@gmail.com>
Subject Re: [users@httpd] Reverse proxy
Date Tue, 06 Mar 2012 21:06:29 GMT
On Tue, Mar 6, 2012 at 9:56 PM, Chris Arnold <carnold@electrichendrix.com>wrote:

> I am trying to config reverse proxy on a server (private ip 192.168.123.3)
> that will forward https://teknerds.net/ifolder to a different server
> (private ip 192.168.123.4). Using apache 2.2.12. According to
> localhost/server-info i have mod_proxy and mod_proxy_http loaded. Here are
> snippets from the vhost.conf for teknerds.net:
> RewriteEngine On
>    RewriteRule ^/ifolder(.*) https://%{HTTP_HOST}/ifolder/ [L]
>    RewriteRule ^/admin(.*) https://%{HTTP_HOST}/admin/ [L]
> to rewrite http://teknerds.net/ifolder to https://teknerds.net/ifolder


%{HTTP_HOST} is not a valid part of a substitution, its only valid when
used with a RewriteCond directive. See
http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriterule for
valid uses of RewriteRule.

In this case, you don't need mod_rewrite at all. Instead set both redirects
with "RedirectMatch ^/(ifolder|admin)$ https://teknerds.net/$1"


>
> Snippet from vhost-ssl.conf:
> SSLProxyEngine On
>        ProxyPass /ifolder https://192.168.123.4/ifolder
>        ProxyPassReverse /ifolder https://192.168.123.4/ifolder
>        ProxyPass /admin https://192.168.123.4/admin
>        ProxyPassReverse /admin https://192.168.123.4/admin
>        ProxyPass /nds https://192.168.123.4/nds
>        ProxyPassReverse /nds https://192.168.123.4/nds
>        <Proxy *>
>                Order allow,deny
>                Allow from all
>        </Proxy>
>
> When i tail the *error_log and access http://teknerds.net/ifolder,
> nothing in the logs. Nothing in the logs when i access
> http://teknerds.net/ifolder/ or https://teknerds.net/ifolder.
> What am i doing wrong?
>

When asking this question, please tell us exactly what you are doing, what
you expect to happen, and what is happening instead.


>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Kind regards,
Mathijs

Mime
View raw message