Installing gitlab in subdomain subdomain (apache) in Debian

1

I wanted to ask if to install gitlab I can do it from a subdomain of a subdomain, that is, I am trying to install on a server of a university so it is a subdomain: ing.universidad.edu.co; therefore the question is if I can specify gitlab to be accessed through gitlab.ing.universidad.edu.co .. I will have to touch the dns? or do I have to create a separate subdomain for this? Thanks.

    
asked by Andres 10.12.2016 в 03:55
source

1 answer

1

You could start by taking a look at a question asked in the community in English Here

Based on this fact, we can talk about something called the Proxy Reverso || Reverse Proxy , which is used in web servers, such as apache or nginx to allow you to mask a port through a web port (80,443).

Personally I use "gogs" this unlike gitlab, it is free and unlimited, and it is also still in development, I had to configure a ReverseProxy to access it with a subdomain, then I share the site configuration in /etc/apache/sites-available/gogs :

'

ServerName git.miservidor.com

RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]

SSLEngine ON

ServerName git.miservidor.com

SSLCertificateKeyFile /etc/apache2/ssl/privkey.pem
SSLCertificateFile /etc/apache2/ssl/cert.pem
SSLCertificateChainFile /etc/apache2/ssl/chain.pem

ProxyPreserveHost ON
ProxyRequests OFF

<Proxy *>
     Order allow,deny
 Allow From 190.0.0.1
</Proxy>

ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/

'

In this case, as you can see, in AllowFrom, you indicate the ip address from where the site will be accessible (If you are going to save your code, it is best to prevent it from crying).

And in the ProxyPass and ProxyPassReverse clause, our local host (127.0.0.1) is indicated and the port on which our git server runs (in my case it is gogs), with this, Apache is responsible for serving the requests avoiding exposing our git server directly.

I hope you serve

    
answered by 10.12.2016 в 13:30