Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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>
    <Proxy *>
            Order deny,allow
            Allow from all

    RewriteEngine On
    # Redirect all non-static requests to thin
    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


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

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

From here:

share|improve this answer
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 Nov 21 '14 at 7:17

Your Answer


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.