Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hello I have the following apache configuration, which is supposed to drive all traffic on port 433 to some balancer that uses a little server called Thin.

<VirtualHost *:443> 
    ServerAdmin webmaster@localhost
    SSLEngine On
        SSLCertificateFile /etc/ssl/private/localhost.pem
    DocumentRoot /home/me/projects/contest/public/

    <Proxy balancer://thinservers>
            BalancerMember http://127.0.0.1:3000
    </Proxy>    
    <Proxy *>
            Order deny,allow
            Allow from all
    </Proxy>

    RewriteEngine On
    # Redirect all non-static requests to thin
    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
    RewriteRule ^/(.*)$ balancer://thinservers%{REQUEST_URI} [P,QSA,L]

    ProxyPass / balancer://thinservers/
    ProxyPassReverse / balancer://thinservers/
    ProxyPreserveHost on

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Anyway, the URLs I get in the Thin server gets changed from https to http, but I want the Thin server to see them as https. Not sure what's wrong and what to do. Any suggestion?

share|improve this question

1 Answer 1

This is a guess, but I think you might need to use this: SSLProxyEngine ON before the block.

From here: http://httpd.apache.org/docs/2.0/mod/mod_ssl.html#sslproxyengine

share|improve this answer
1  
He'll also need to change his BalancerMember definition from http:// to https://, but SSLProxyEngine On is the harder-to-find piece of the puzzle –  DerfK May 31 '11 at 1:30
    
Well since the https runs on the port 443, for this case it seems a bit illogical to change the BalancerMember definition to https for a given port. I used RequestHeader set X_FORWARDED_PROTO 'https' with SSLProxyEngine ON and It seems it's workking –  Onur yesterday

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.