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.

I have set up a reverse proxy and on the resulting page the http links show as https, so they cannot be loaded as this is a pure http page.

Could this be caused by a bad reverse proxy configuration?

This is my proxy.conf:

<IfModule mod_proxy.c>

ProxyRequests Off
<Proxy *>
        AddDefaultCharset off
        Order deny,allow
        Deny from all
        Allow from all
</Proxy>
</IfModule>

And this is the VHOST:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName example.com
        ServerAlias www.example.com

        ProxyPass / http://example.com:80/
        ProxyPassReverse / http://example:80/

        ErrorLog /home/webroot/myproxy/log/error.log
        CustomLog /home/webroot/myproxy/log/access.log combined

</VirtualHost>

If I load the original example.com site directly all the links are correct

share|improve this question
    
mod_proxy does not touch web page content, so the https links are created by the software of the backend. You need to address it there. –  Krist van Besien May 16 '13 at 4:22

2 Answers 2

It can be caused also by the app you are proxying to. If this does some sort of redirect to https, the resulting request from the client would be to the https page. Because you are not proxying https, it will not work.

Please give more information, especially what lies behind your proxy.

share|improve this answer
    
the pages are not https, only the links in it. –  Alojz Janez May 15 '13 at 17:51
    
This is not the proxy issue then. Proxy processes only headers, the page itself is sent untouched. You will probably need to process whole page content with some module and ``manually'' rewrite the addresses. –  Fiisch May 15 '13 at 18:22

I found out that the https links were actually created by the backend software because of some wrong setting.

I was in error because I was thinking that mod_proxy can do this, but it can't, this can be done by another module that rewrites the links in the html.

This was also answered by Krist van Besien in a comment to the question:

mod_proxy does not touch web page content, so the https links are created by the software of the backend. You need to address it there. – May 16 at 4:22

share|improve this answer

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.