http and https redirection

Khapare Joshi <[email protected]> Tue, 24 Jan 2012 19:58:34 +0000
Newsgroups gmane.linux.redhat.piranha
Message-ID <CABHhH+vnfLx1-G4FEm9jQ23vneBDySNrU-MuJZ4ahnEJ4w_Ofg@mail.gmail.com>
--===============3135749343277945316==
Content-Type: multipart/alternative; boundary=f46d040839557edcb404b74b92d0

--f46d040839557edcb404b74b92d0
Content-Type: text/plain; charset=ISO-8859-1

Hello all,

my load balancer seems now working and it does the fail over. I have now
issue with https. I added the VIP in piranha interface both for port 80 and
443 and added REAL server in these VIPs. I then opened port 80 and 443 on
active router (I am not sure if port 443 require to open as client actually
connects to port 80 ). Then I added VIP address on Real server and
configure apache to listen on port 443. I have a virtual section in REAL
server as below:


<VirtualHost 192.168.1.3:80>
        ServerName mytest
        DocumentRoot /var/www/html/test
        CustomLog /var/log/test_access_log combined
        AddDefaultCharset UTF-8
        Redirect Permanent / https://piranhatest.com/
</VirtualHost>

<VirtualHost 192.168.1.1:443>
        ServerName piranhatest.com
        DocumentRoot /var/www/html
        AddDefaultCharset UTF-8
</VirtualHost>

I have all the certtificate and required configuration in ssl.conf for 443.
But it does not work and complain that I do not have virtualhost for
192.168.1.3:443. If i do not add this virtualhost for 192.168.1.3:443,
ipvsadm -L do not even list the real server of 443. 192.168.1.3 is my real
server and 192.168.1.1 is my VIP.

How does Piranha handles this ? does the Real server eth0 and eth0:1 has to
be configured on port 443 ? or is there something in configuration I can do
so the lvs listen on port 80 and redirect to one of the Real server then
serve sties with RS VIP interface ? I am getting confused.

All I am trying to now is I have a site obviously users connects with port
80 but I would like to redirect to 443 /https port and I want to do this
with my piranha setup. Any hint would be appreciated.

Khapare

--f46d040839557edcb404b74b92d0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello all,<br><br>my load balancer seems now working and it does the fail o=
ver. I have now issue with https. I added the VIP in piranha interface both=
 for port 80 and 443 and added REAL server in these VIPs. I then opened por=
t 80 and 443 on active router (I am not sure if port 443 require to open as=
 client actually connects to port 80 ). Then I added VIP address on Real se=
rver and=A0 configure apache to listen on port 443. I have a virtual sectio=
n in REAL server as below:<br>
<br><br>&lt;VirtualHost <a href=3D"http://192.168.1.3:80">192.168.1.3:80</a=
>&gt;<br>=A0=A0=A0=A0=A0=A0=A0 ServerName mytest<br>=A0=A0=A0=A0=A0=A0=A0 D=
ocumentRoot /var/www/html/test<br>=A0=A0=A0=A0=A0=A0=A0 CustomLog /var/log/=
test_access_log combined<br>=A0=A0=A0=A0=A0=A0=A0 AddDefaultCharset UTF-8<b=
r>
=A0=A0=A0=A0=A0=A0=A0 Redirect Permanent / <a href=3D"https://piranhatest.c=
om/">https://piranhatest.com/</a><br>&lt;/VirtualHost&gt;<br><br>&lt;Virtua=
lHost <a href=3D"http://192.168.1.1:443">192.168.1.1:443</a>&gt;<br>=A0=A0=
=A0=A0=A0=A0=A0 ServerName <a href=3D"http://piranhatest.com">piranhatest.c=
om</a><br>
=A0=A0=A0=A0=A0=A0=A0 DocumentRoot /var/www/html<br>=A0=A0=A0=A0=A0=A0=A0 A=
ddDefaultCharset UTF-8<br>&lt;/VirtualHost&gt;<br><br>I have all the certti=
ficate and required configuration in ssl.conf for 443. But it does not work=
 and complain that I do not have virtualhost for <a href=3D"http://192.168.=
1.3:443">192.168.1.3:443</a>. If i do not add this virtualhost for <a href=
=3D"http://192.168.1.3:443">192.168.1.3:443</a>, ipvsadm -L do not even lis=
t the real server of 443. 192.168.1.3 is my real server and 192.168.1.1 is =
my VIP.<br>
<br>How does Piranha handles this ? does the Real server eth0 and eth0:1 ha=
s to be configured on port 443 ? or is there something in configuration I c=
an do so the lvs listen on port 80 and redirect to one of the Real server t=
hen serve sties with RS VIP interface ? I am getting confused. <br>
<br>All I am trying to now is I have a site obviously users connects with p=
ort 80 but I would like to redirect to 443 /https port and I want to do thi=
s with my piranha setup. Any hint would be appreciated.<br><br>Khapare<br>

--f46d040839557edcb404b74b92d0--


--===============3135749343277945316==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Piranha-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/piranha-list
--===============3135749343277945316==--