Re: Reverse proxy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 6, 2012 at 9:56 PM, Chris Arnold <carnold@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


Kind regards,
Mathijs

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux