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

I have a http service running on

This is delivered as a public https service to which is via apache proxy magic:


    #Configure Reverse Proxy
    ProxyRequests Off
    ProxyPreserveHost On

    <Location />

        Order allow,deny
        Allow from all

    #Define Virtual Host Specific SSL information.
    SSLEngine On
    SSLProxyEngine On
    SSLProxyProtocol all -SSLv2

    SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
    SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key


When I enter in my browser and click through the certificate, I can get the first page which contains a login form:

<form action="" method="post">
  <--  ... contains username, password fields and a send button -->

So the action target was very nice rewritten. But the http should read https. How to do that?

It would be nice if the link was changed in the form action tag, pointing to the correct https page already, rather using a second http virtual host with a rewrite condition.


This is the additional part that solved it (I put it in the vhost but outside the Location container):

SetOutputFilter proxy-html

# On: rewrite also css and javascript - Off: only in HTML
ProxyHTMLExtended Off
# Maybe this should be switched on

share|improve this question
up vote 3 down vote accepted

You might try It's intended to rewrite URLs in a "proxy situation".

share|improve this answer
I solved it with your help. Thank you. – mit Oct 18 '10 at 20:11

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.