LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache problem: Aliased content isn't transmitted in clear; not SSL. (https://www.linuxquestions.org/questions/linux-server-73/apache-problem-aliased-content-isn%27t-transmitted-in-clear%3B-not-ssl-4175435758/)

cignul9 11-05-2012 12:24 PM

Apache problem: Aliased content isn't transmitted in clear; not SSL.
 
I want to optimize my site so that static content is served by apache but dynamic app content is served by my app server behind apache. Apache and my app server talk ajp13. Incoming connections from clients using http get redirected to https in httpd.conf. After that the site should be all-ssl. However when the ssl site serves up the static stuff (contained in three directories) it apparently gets sent via http, or unecrypted, and that's the problem. I know because Chrome says it does when I load the page. You get cert errors. when I commment out the static content redirecting bits in the ssl.conf the problem goes away. Does anyone know how I can fix up my redirect or my ssl.conf so my images, js, and css files are served over ssl? Here are the snippets from my config.

From httpd.conf:
Code:

<VirtualHost *:7016>
        ServerName *.example.com
        RewriteEngine On
        RewriteRule ^(.*) https://%{SERVER_NAME}$1 [R,L]
</VirtualHost>

From ssl.conf
Code:

<VirtualHost *:7416>
        ServerName *.example.com

        SetEnvIf Request_URI "^/images/*" no-jk
        SetEnvIf Request_URI "^/js/i*" no-jk
        SetEnvIf Request_URI "^/css/*" no-jk
        Alias "/images/" "/nfsMount/staticContent/example/images/"
        Alias "/js/" "/nfsMount/staticContent/example/js/"
        Alias "/css/" "/nfsMount/staticContent/example/css/"
               
        <Directory "/nfsMount/staticContent/example/">
              Options None
              AllowOverride None
              Order allow,deny
              Allow from all
        </Directory>

        JkMount /* example_beta

        SSLEngine on
        SSLCertificateFile /ssl_keys/example.com/star_example_com.crt
        SSLCertificateKeyFile /ssl_keys/example.com/example.key
        SSLCACertificateFile /ssl_keys/example.com/DigiCertCA.crt

</VirtualHost>

Thank you in advance for any help you can provide.

____________________________

I think my browser cache was playing tricks on me. After some time the servers started working as expected. Yay!


All times are GMT -5. The time now is 03:13 PM.