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

I need your help. I'm having problems with reverse proxy rewriting to https:

I have an alfresco app running on top of tomcat and as a front and an Apache server - it's site-enabled looks like that:

    <VirtualHost *:80>
    ServerName alfresco

    JkMount /* ajp13_worker


    <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

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

    CustomLog /var/log/apache2/access.log combined
    ServerSignature Off
    </VirtualHost>

I also have a reverse proxy server running on second machine and i want it to rewrite queries to https. It's site-enabled looks like that:

    <VirtualHost 192.168.251.50:80>
    ServerName alfresco

    DocumentRoot /var/www/


    RewriteEngine on
    RewriteRule (.*) https://alfresco/  [R]

    LogLevel warn
    ErrorLog  /var/log/apache2/alfresco-80-error.log
    CustomLog /var/log/apache2/alfresco-80-access.log combined
    ServerSignature Off
    </VirtualHost>


    <VirtualHost 192.168.251.50:443>
    ServerName alfresco

    DocumentRoot /var/www/

    SSLEngine On
    SSLProxyEngine On
    SSLCertificateFile      /etc/ssl/certs/alfresco.pem
    SSLCertificateKeyFile   /etc/ssl/private/alfresco.key

    SetEnvIf User-Agent ".*MSIE.*"  nokeepalive ssl-unclean-shutdown \
                                    downgrade-1.0 force-response-1.0

    ProxyRequests Off
    ProxyPreserveHost On

    <Proxy *>
            Order deny,allow
            Allow from all
    </Proxy>

    ProxyPass /alfresco       http://192.168.251.50:8080/alfresco
    ProxyPassReverse /alfresco http://192.168.251.50:8080/alfresco

    LogLevel warn
    ErrorLog /var/log/apache2/alfresco-443-error.log
    CustomLog /var/log/apache2/alfresco-443-access.log combined
    ServerSignature Off
    </VirtualHost>

Now, ProxyPass works, when I go to alfresco/alfrsco in a browser application opens, but rewriting to https doesn't work.

Plese help.

Regards


when I go to 192.168.251.50 Tomcat configuration page shows up. When I go to 192.268.251.50:8080 - the same as above when I go to 192.168.251.50:8080/alfresco - alfresco app page shows app when I go to alfresco/alfresco - same as above when i go to https://alfresco or https://alfresco i get an error connecting to a server

share|improve this question
    
What happens when you access http on the 192.168.251.50 system? –  Shane Madden Mar 18 '12 at 19:12
    
when I go to 192.168.251.50 Tomcat configuration page shows up. When I go to 192.268.251.50:8080 - the same as above when I go to 192.168.251.50:8080/alfresco - alfresco app page shows app when I go to alfresco/alfresco - same as above when i go to alfresco or alfresco i get an error connecting to a server –  polishpt Mar 19 '12 at 7:36
    
Have you configured name resolution to send that name to the correct server? –  Shane Madden Mar 19 '12 at 19:43

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.