Apache Web Server Rewrite rule
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Hi Experts,
Really need your help to resolve an issue. In our case, F5 Load balancer is forwarding http requests to Apache Web Server at 9080. We have an existing rewrite rule as below.
NameVirtualHost *:9043
<VirtualHost *:9043>
SSLEngine on
SSLCertificateFile /local/isign/apachewebserver/httpd242/conf/isigndev-2048.crt
SSLCertificateKeyFile /local/isign/apachewebserver/httpd242/conf/isigndev.key
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
</VirtualHost>
<VirtualHost *:9080>
RewriteEngine On
RewriteCOND %{https} !=on [NC]
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</VirtualHost>
The above rule works fine when requests coming on 9080 port then
It works fine because the URL does not contain Port number.
Can anyone help me rewrite rule based on my below requirements :
If request coming on 9080 port then
That is, simply convert http to https.
Your help on this is greatly appreciated.
Thanks,
Sudeep Pandey
[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]