Ok so here is my current setup

D6.15
PHP 5.2.11

Internet->Apache Reverse Proxy and SSL->Apache Drupal Server installed at DocRoot.

I have not touched the $base_url and I should not have to.

File downloads are set to public. I can sit and watch every request come through the reverse proxy but none of my file downloads are proxied/SSL'ed. I am talking specifically about files attached to nodes via the upload module.

Uploaded/Attached files:

http://ip.of.host/sites/default/files/drupal/filename.doc

Every other site link:

https://sitename.domain/examplepage

This presents a serious problem before I go live because (not to mention the security aspect):

It's a private IP. Links no worky.

Comments

crabcakes’s picture

Anyone? Starting to think this is a problem with the upload module or core itself

crabcakes’s picture

I was able to make some progress on this

Uploaded/Attached files:

http://sitename.domain/sites/default/files/drupal/filename.doc

Every other site link:

https://sitename.domain/examplepage

So basically now all file attachments/downloads are not proxied or SSL'ed.

crabcakes’s picture

I wanted to update this issue and consider it to resolved. Although this may seem trivial to most it was not apparent to me all of these settings had to be correct in order for it to work. Also in 6.15 the default settings.php was incorrect for the 'reverse proxy' lines missing $conf = array(

I'm posting this because I spent two weeks crawling through this site, IRC, and other sites trying to figure this out problem and hope this might help someone else. The documentation is really lacking for this type of setup (which admittedly is probably not very popular but might be for you corp people running an intranet via drupal).

Essentially if you're using a reverse proxy and SSL in the setup below:

File downloads set to 'private'. Using module xsend. (really not specific to this setup but I would think it's suggested)

Internet->Apache Proxy and SSL (apache vhost setup)->drupal server (apache vhost setup)

in settings.php

$base_url = 'https://address.of.proxy.server';   // NO trailing slash

$cookie domain = 'proxyhostname.domain.com';

$conf = array(
'reverse_proxy' => TRUE,
'reverse_proxy_addresses' => array('IP.OF.PROXY',),
);

Below is my apache vhost config for both the proxy server and drupal server.

Drupal server

<VirtualHost IP.OF.DRUPAL.SERVER:80>
        ServerName proxyservername.yourdomain.com
        DocumentRoot /your/docroot/directory
        ScriptAlias /cgi-bin/ "/your/docroot/directory/www/cgi-bin/"
        <Directory "/your/docroot/directory/www/cgi-bin">
                AllowOverride None
                Options None
                Order allow,deny
                Allow from all
        </Directory>
        <Directory "/your/docroot/directory">
                RewriteEngine on
                RewriteBase /
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
        </Directory>
        ErrorLog logs/drupal-error_log
        CustomLog logs/drupal-access_log common
</VirtualHost>

Apache Proxy server running mod_ssl and reverse proxying back to drupal server (via http)

<VirtualHost IP.OF.PROXY.SERVER:443>
        SSLEngine on
        SSLCertificateFile /etc/httpd/yourcert.crt
        SSLCACertificateFile /etc/httpd/intermediate.crt
        SSLCertificateKeyFile /etc/httpd/yourkey.key
        ServerName servername.domain.com
        ErrorLog logs/ssl_error_log
        TransferLog logs/ssl_access_log
        LogLevel warn
        RequestHeader set X_FORWARDED_PROTO "https"
        ProxyPass / http://IP.OF.DRUPAL.SERVER/
        ProxyPassReverse / http://IP.OF.DRUPAL.SERVER/
        ProxyTimeout 600
</VirtualHost>

<VirtualHost IP.OF.PROXY.SERVER:80>
        ServerName servername.domain.com
        RedirectMatch ^/* https://servername.domain.com
        RequestHeader set X_FORWARDED_PROTO "https"

</VirtualHost>