Larry,<br><br>thanks for your reply again. Sorry I stole your time for my own dumbness.<br><br>It&#39;s totally possible to do it via headers. The example I gave above, works perfectly. I have just been too dump to test it in https (I tested in http) and wondered why the header does not come through as expected :( Oh lord.<br>
<br>So just for reference. As the manual states correctly, you can pass any header information on to your backend scripts via the <br><br>proxy_set_header       
    Header-Name    Header-Vale;<br><br>directive. Apache does NOT filter it out, and it&#39;s visible within PHP by using one of the two following options:<br><br>1.) use the normal $_SESSION variable. CAVEAT: when using the $_SESSION variable your header &quot;Header-Name&quot; becomes &quot;HTTP_HEADER_NAME&quot; (watch casing and underscore instead of dash)<br>
<br>2.) use the apache_request_headers function to retrieve original/unchanged values (<a href="http://uk.php.net/apache_request_headers">http://uk.php.net/apache_request_headers</a>)<br><br>Thanks for your time, folks!<br>
<br>Pete<br><br><div class="gmail_quote">On Sun, Apr 5, 2009 at 2:40 PM, Larry Bates <span dir="ltr">&lt;<a href="mailto:larry.bates@vitalesafe.com">larry.bates@vitalesafe.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">What about passing parameter to your PHP script using 
rewrite rule?</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">rewrite  ^(.*)$  <a href="http://%3Curl+to+backend+server+or+IP:port%3E/" target="_blank">http://&lt;url to backend 
server or IP:port&gt;/</a>login.php?proto=SSL</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">I might not be understanding your exact problem 
though.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div><font color="#888888">
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">-Larry Bates</font></span></div></font><div class="im"><br>
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:owner-nginx@sysoev.ru" target="_blank">owner-nginx@sysoev.ru</a> 
[mailto:<a href="mailto:owner-nginx@sysoev.ru" target="_blank">owner-nginx@sysoev.ru</a>] <b>On Behalf Of </b>Peter 
Langhans<br><b>Sent:</b> Sunday, April 05, 2009 8:03 AM<br><b>To:</b> 
<a href="mailto:nginx@sysoev.ru" target="_blank">nginx@sysoev.ru</a><br><b>Subject:</b> passing header information on to backend 
Apache/PHP<br></font><br></div>
<div></div></div><div><div></div><div class="h5">Hi,<br><br>I&#39;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&#39;s working fine, but when I proxy through to apache, the 
knowledge about SSL is &#39;lost&#39;. If possible, I don&#39;t want to be using different 
ports for proxying through to apache.<br><br>I thought it&#39;d be enough to set 
headers like:<br><br>for 80:<br>proxy_set_header       
    X-Secure     of;<br><br>for 
443:<br>proxy_set_header           
X-Secure     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></div></div></div>
</blockquote></div><br>