<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=668563713-05042009><FONT face=Arial 
color=#0000ff size=2>What about passing parameter to your PHP script using 
rewrite rule?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=668563713-05042009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=668563713-05042009><FONT face=Arial 
color=#0000ff size=2>rewrite&nbsp; ^(.*)$&nbsp; <A 
href="http://<url to backend server or IP:port>/">http://&lt;url to backend 
server or IP:port&gt;/</A>login.php?proto=SSL</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=668563713-05042009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=668563713-05042009><FONT face=Arial 
color=#0000ff size=2>I might not be understanding your exact problem 
though.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=668563713-05042009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=668563713-05042009><FONT face=Arial 
color=#0000ff size=2>-Larry Bates</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> owner-nginx@sysoev.ru 
[mailto:owner-nginx@sysoev.ru] <B>On Behalf Of </B>Peter 
Langhans<BR><B>Sent:</B> Sunday, April 05, 2009 8:03 AM<BR><B>To:</B> 
nginx@sysoev.ru<BR><B>Subject:</B> passing header information on to backend 
Apache/PHP<BR></FONT><BR></DIV>
<DIV></DIV>Hi,<BR><BR>I'm using nginx 0.6.35, apache 2.0.63 and php 
5.2.9.<BR><BR>My problem is, that I need my php scripts to know in some way or 
another whether SSL is used or not (to include either https or http javascript 
files e.g.).<BR><BR>When using nginx as webfrontend proxy, it accepts all the 
ssl connections and it's working fine, but when I proxy through to apache, the 
knowledge about SSL is 'lost'. If possible, I don't want to be using different 
ports for proxying through to apache.<BR><BR>I thought it'd be enough to set 
headers like:<BR><BR>for 80:<BR>proxy_set_header&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; X-Secure&nbsp;&nbsp;&nbsp; &nbsp;of;<BR><BR>for 
443:<BR>proxy_set_header&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
X-Secure&nbsp;&nbsp;&nbsp; &nbsp;on;<BR><BR>put I have not found a way how I 
could retrieve those values from within the php script. They seem to be filtered 
out by Apache.<BR><BR>Does anyone have an idea how I can get any custom set 
header, set in the nginx.conf through to the php scripts?<BR><BR>Thanks a 
lot,<BR>Peter<BR></BODY></HTML>