Here's what I had to do:
Most of the following is necessary to get SSL proxying to work properly.
1) Setup squid
2) Give squid its own hosts file:
host_file /etc/squid/hosts
3) In that hosts file, put "1.2.3.4 www.foo.company.com" to make the proxy go to my local box for that host instead.
4) Setup Apache to listen for *:80 and *:443 to catch the redirected proxy requests.
5) <VirtualHost *:443>
DocumentRoot /var/www/apache2-default
CustomLog /var/log/apache2/tst1-443.log combined
SSLEngine On
SSLProtocol -all +TLSv1 +SSLv3
SSLVerifyClient none
SSLProxyProtocol -all +TLSv1 +SSLv3
SSLCertificateFile /etc/apache2/ssl/ssl.crt/www.foo.company.com.crt
SSLCertificateKeyFile /etc/apache2/ssl/ssl.key/www.foo.company.com.key
<Location />
Options Indexes FollowSymLinks MultiViews
Order allow,deny
allow from all
</Location>
AllowCONNECT
RequestHeader set Front-End-Https "On"
RewriteLog /var/log/apache2/rewrite2.log
RewriteLogLevel 9
RewriteEngine On
SSLProxyEngine On
ProxyPreserveHost On
RewriteCond %{HTTP_HOST} ^www.foo.company.com
RewriteRule ^/([^/]+)/stuff/(.*)$ [link|https://www.foo.company.com/$1/stuff/$2|https://www.foo.company.com/$1/stuff/$2] [proxy,last]
RewriteCond %{HTTP_HOST} ^www.foo.company.com
RewriteRule ^/([^/]+)/servlet/(.*)$ [link|http://localhost:13826/thingy/$1/$2|http://localhost:13826/thingy/$1/$2] [proxy,last]
RewriteCond %{HTTP_HOST} ^www.foo.company.com
RewriteRule ^/(.*)$ [link|https://www.local.company.com/$1|https://www.local.company.com/$1] [proxy,last]
</VirtualHost>
The RewriteCond allows me to service several proxied servers (www.foo.company.com, www.bar.company.com, etc) as well as local content by default.
6) Set my browser to use squid as its proxy.
The upshot is that I can now use my local server to serve up servlets, javascript, etc., but use the real server to serve up content that I can't or don't want to duplicate locally. Much of the pain was self-inflicted, because I could have just put www.foo.company.com in /etc/hosts. Had I done that, however, I would have had to change the hosts file every time I wanted to go directly to that host without the proxy setup. Now all I have to do is turn off the proxy in Firefox.
PITA, basically, but there it is.
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."