Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th February 2013, 11:35
volf volf is offline
Junior Member
 
Join Date: Feb 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Apache reverse proxy forwarding https header

I have successfully installed reverse proxy on Apache. It works like a charm. I'm using it to proxy https request to http. My problem is that I need to forward variable SERVER_HTTPS to my end server, to indicate if person is using ssl connection or just http. I have found one way to do: Each time I can forward HTTP_X_FORWARDED_PROTO variable and check on end server:

if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
$_SERVER['HTTPS']='on';

But this variant is not good for me, because I can't edit the end servers scripts. Lets say that I don't even have access to it. But I know how to check if it is forwarded. So, Generally my question is: Is there any way that I can forward this variable? I have seen one more variant, with Rewrite engine , but it didn't work for me and there is no detailed information. Maybe If I will set my server on Nginx + apache this will send this header variable?
Reply With Quote
Sponsored Links
  #2  
Old 22nd February 2013, 13:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
 
Default

On an nginx reverse proxy, you would also set

Code:
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
so I guess this makes no difference.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
nginx Reverse Proxy on Separate Server from Apache atjensen11 HOWTO-Related Questions 2 8th September 2012 22:26
haproxy with stunnel problem abubin Server Operation 6 10th April 2012 15:08
sessions not being saved gavimobile General 6 15th January 2012 15:05
Apache hangs without traffic Thesee General 21 27th September 2011 23:43
Mod_Perl Configuration Issue szise Installation/Configuration 4 28th November 2008 12:41


All times are GMT +2. The time now is 09:27.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.