I easily installed Gitlab on my Ubuntu 14.04 Server and got it running from my internal IP Adresse. Now i try to figure out how i can Setup my Apache2 mod_proxy to have my Gitlab installation open for my external IP Adress.
Here is what i have
- working Gitlab installation on Ubuntu 14.04, there is a Apache2 on the same server, offering Owncloud and some other Websites too.
- static public IPv4 adress.
- static public IPv6 adress.
- public DNS Name.
- Port forwarding on my Router to my mod_proxy Apache2 Server (Ubuntu 14.04).
- mod_proxy configured to successfully serve owncloud and other sites (wich are on the same server as gitlab is installed on, but served by apache2)
My proxyservers apache configuration
for http:
<VirtualHost *:80>
ServerName my_external_domainname.deServerAdmin me@my_external_domainname.de DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined ProxyPreserveHost On ProxyRequests Off AllowEncodedSlashes NoDecode ProxyPass "/owncloud" "https://192.168.7.6/owncloud" ProxyPassReverse "/owncloud" "https://192.168.7.6/owncloud" ProxyPass "/git" "https://192.168.7.6:8443/" ProxyPassReverse /git "https://192.168.7.6:8443/" ProxyPass "/fhem" "https://192.168.7.6:8083/fhem" ProxyPassReverse "/fhem" "https://192.168.7.6:8083/fhem" ProxyPass "/webmail" "http://192.168.7.6/webmail" ProxyPassReverse "/webmail" "http://192.168.7.6/webmail" ProxyPass "/shuffle" "http://192.168.7.6/shuffle" ProxyPassReverse "/shuffle" "http://192.168.7.6/shuffle" ProxyPass "/prtg" "https://192.168.7.10:444" ProxyPassReverse "/prtg" "https://192.168.7.10:.444" ProxyPass "/tt-rss" "https://192.168.7.6/tt-rss" ProxyPassReverse "/tt-rss" "https://192.168.7.6/tt-rss" ProxyPass "/bouncer" "https://192.168.7.4:8080" ProxyPassReverse "/bouncer" "https://192.168.7.4:8080"
vim: syntax=apache ts=4 sw=4 sts=4 sr noet
for https:
<IfModule mod_ssl.c> <VirtualHost _default_:443> ServerName my_external_domainname.de ServerAdmin me@my_external_domainname.de ServerSignature Off DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on SSLCertificateFile /etc/apache2/ssl/my_external_domainname.de/my_external_domainname.de.cer SSLCertificateKeyFile /etc/apache2/ssl/my_external_domainname.de/my_external_domainname.de.key SSLCertificateChainFile /etc/apache2/ssl/my_external_domainname.de/sub.class1.server.ca.pem SSLProtocol All -SSLv2 -SSLv3 SSLCompression off SSLHonorCipherOrder On SSLCipherSuite EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+S$ Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains"
SSLProxyEngine on SSLProxyVerify none SSLProxyCheckPeerCN off SSLProxyCheckPeerName off
ProxyPreserveHost On ProxyRequests Off
AllowEncodedSlashes NoDecode
ProxyPass "/owncloud" "https://192.168.7.6/owncloud" ProxyPassReverse "/owncloud" "https://192.168.7.6/owncloud"
ProxyPass "/git" "https://192.168.7.6:8443/" ProxyPassReverse /git "https://192.168.7.6:8443/"
ProxyPass "/fhem" "https://192.168.7.6:8083/fhem" ProxyPassReverse "/fhem" "https://192.168.7.6:8083/fhem"
ProxyPass "/webmail" "http://192.168.7.6/webmail" ProxyPassReverse "/webmail" "http://192.168.7.6/webmail"
ProxyPass "/shuffle" "http://192.168.7.6/shuffle" ProxyPassReverse "/shuffle" "http://192.168.7.6/shuffle"
ProxyPass "/prtg" "https://192.168.7.10:444" ProxyPassReverse "/prtg" "https://192.168.7.10:.444"
ProxyPass "/tt-rss" "https://192.168.7.6/tt-rss" ProxyPassReverse "/tt-rss" "https://192.168.7.6/tt-rss"
ProxyPass "/bouncer" "https://192.168.7.4:8080" ProxyPassReverse "/bouncer" "https://192.168.7.4:8080" </VirtualHost>
my Gitlab config (gitlab.rb) besides al lot of email stuff is:
external_url ‘https://my_external_domainname.de’
nginx[‘listen_port’] = 8443
All proxied sites are available trough: my_external_domainname.de/subfoldername, except Gitlab. When i call:
https://192.168.7.5/git (wich ist my proxy’s internal IP) i get redirected to https://192.168.7.5/users/sign_in
from the external IP https://my_external_domainname.de/git i get:
404 Not Found
The requested URL /git was not found on this server.
I don’t know what to do, to reach Gitlab from https://my_external_domainname.de.de/git
Maybe someone here can help me?
Thanks
Dirk