logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Rewriting url from http to https with reverse proxy
Author
cedricdaking



Joined: 22 Apr 2014
Posts: 11
Location: PARIS

PostPosted: Tue 10 Mar '15 16:06    Post subject: Rewriting url from http to https with reverse proxy Reply with quote

Hello,

I m using an apache reverse proxy :
httpd -version
Server version: Apache/2.2.15 (Unix)
Server built: Oct 16 2014 14:48:21

In front of an internet liferay server, I m forcing https connexion and my reverse proxy is the SSL endpoint, and it is working fine.
But inside the liferay page there are "http" link to other webserver, and browser are refusing to load them because they are http and not https.
Is there a way in the reverse proxy to rewrite "on the fly" "http" link to "https" so that everything would be load on the browser ?
I was thinking mod_proxy_html but it doesn t seams to do what I want.
Thank you in advance
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Mon 16 Mar '15 12:49    Post subject: Reply with quote

if you have two vhost one on port 80 and one on port 443 as reverse proxy you can force a redirect to the 443 vhost.

or see http://www.apachelounge.com/viewtopic.php?t=6441 how to use mod_sed
Back to top
gmoniker



Joined: 22 Mar 2015
Posts: 3
Location: Netherlands

PostPosted: Sun 29 Mar '15 1:33    Post subject: Rewriting urls Reply with quote

Hello Cedric,

The easiest would be if Liferay knew to generate https links. I saw somewhere that you could set
Code:
web.server.host=liferayportal
web.server.protocol=https
web.server.https.port=443
in Portal properties. Maybe that could help?

Otherwise, I think you should take a look at mod_proxy_html. This is only available with newer linux distributions though. Ubuntu 14.04 has it in the packages.

The docs: http://httpd.apache.org/docs/current/mod/mod_proxy_html.html

This is old, but can give some background:
http://www.apachetutor.org/admin/reverseproxies
Back to top


Reply to topic   Topic: Rewriting url from http to https with reverse proxy View previous topic :: View next topic
Post new topic   Forum Index -> Apache