Keep Server Online
  
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
  
or
  
 
  
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.
 |    |   
 | 
     Topic: Rewriting url from http to https with reverse proxy | 
 |   
| Author | 
  | 
 
cedricdaking
 
 
  Joined: 22 Apr 2014 Posts: 11 Location: PARIS
  | 
 Posted: Tue 10 Mar '15 16:06    Post subject: Rewriting url from http to https with reverse proxy | 
     | 
 
  | 
 
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: 7443 Location: EU, Germany, Next to Hamburg
  | 
 | 
 
| Back to top | 
 | 
 
gmoniker
 
 
  Joined: 22 Mar 2015 Posts: 3 Location: Netherlands
  | 
 Posted: Sun 29 Mar '15 1:33    Post subject: Rewriting urls | 
     | 
 
  | 
 
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 | 
 | 
 
 
 
 
 | 
 
 
 |  
 
 |  
  |   
 |