Hi,
I followed this tutorials for setting up Stash behind an Apache reverse proxy (SSL variant). My Problem is that I'd like to redirect all http requests to https. I recon this is more of a Apache question than Stash, but while fiddeling with various options I have seen some weird url rewriting cases and I guess Stash isn't completely innocent regarding this matter 
I have the following connector config in my server.xml:
<Connector port="7990"
protocol="HTTP/1.1"
connectionTimeout="20000"
useBodyEncodingForURI="true"
redirectPort="443"
compression="on"
scheme="https"
secure="true"
proxyName="source.spielhaus-ftw.com"
proxyPort="443"
compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript"
/>
The VirtualHost looks like this:
<VirtualHost *:80>
ServerName source.spielhaus-ftw.com
ServerAdmin xxx
ErrorLog xxx
CustomLog xxx
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>
<VirtualHost *:443>
ServerName source.spielhaus-ftw.com
ServerAdmin xxx
ErrorLog xxx
CustomLog xxx
# SSL Config
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile xxx
SSLCertificateKeyFile xxx
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:7990/ connectiontimeout=5 timeout=300
ProxyPassReverse / http://localhost:7990/
</VirtualHost>
The interesting bit is the RewriteRule in the :80 VirtualHost. If I leave this in, everything works but I am still able to git clone stuff via http - and that's not what I want. My actual solution is to completely ditch the :80 VirtualHost and only listen on :443. This works, but has the downside that my users will need to remember to add https to the URL or else it won't work.
So to sum up. I'd like to force redirect the entire traffic to Stash via https - even when users try to access it via http.
Thanks,
Stefan