Dived into the joys of using apache as a proxy. Awesome. There is a learning curve to deal with but the payoff is well worth it!
I took the virtual host approach to benefit from having the same urls whether I access locally or externally. Everything is setup, apache mod_proxy is listening on port 443, redirecting all gitlab.mydomain traffic to lan based lamp stack and all is swell except when I hit the front page, after being redirected http://gitlab.mydomain/users/sign_in. I have to retype the https in the url manually and then all is well. Ditto when I post a comment on the projects page. For the login problem the application (gitlab) seems to redirect anonymous non-logged in users to http://gitlab.mydomain.com instead of the expected https://gitlab.mydomain.com.
I probably will have to dive into code tomorrow and see if it is at application level ie maybe a $base_url variable of some sort like in Drupal. Here is the vhost file, maybe I missed or broke something in there, any tips welcome.
############################################################
#
# proxy related directives
#
###########################################################
#NameVirtualHost gitlab.mydomain.com:443
<VirtualHost *:443>
ServerName gitlab.mydomain.com
ProxyRequests off
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
CustomLog logs/gitlab_log combined
LogLevel info
SSLProxyEngine On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
SSLEngine on
SSLProtocol all
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
# SSLProtocol all -SSLv2
# SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
ProxyPass / https://gitlab.mydomain.com/
ProxyPassReverse / https://gitlab.mydomain.com/
</VirtualHost>
Just saw that NameVirtualHost is commented?!? is this not needed? Whatever, things are 95% working but the signup page is kind of annoying.
Can someone with enough rep to edit tags please add gitlab tag to post?
The isssue turned out to be resolved application side. In gitlab configuration files one needs to indicate protocol is https.