Gitlab + Apache Ubuntu 14.04

Please, I need to install Github with Apache on Ubuntu Server 4.14. I want to configure my localhost on / var / www Apache, actually it is done. But when I install Gitlab, I lose this option when you type localhost, it gets to the Gitlab page, and I need it to go to / var / www Can someone help me?

+6
source share
1 answer

Assuming you have already installed gitlab, try the following:

sudo sh -c "echo 'external_url \"http://localhost:8080\"' > /etc/gitlab/gitlab.rb" sudo gitlab-ctl reconfigure sudo gitlab-ctl restart 

So, now gitlab should be running and configured to listen on port 8080 and should be installed for your correct URL.

Now Apache needs proxy traffic for requests from this URL in gitlab.

Enable the Apache proxy module.

 sudo a2enmod proxy_http 

Now create a file for the virtual host, let's call it gitlab.conf.

 sudo vi /etc/apache2/sites-available/gitlab.conf 

This is your configuration file.

 <VirtualHost *:80> ServerName gitlab.localhost #git lab passthrough ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ </VirtualHost> 

And in your hosts file add this line:

 127.0.0.0 gitlab.localhost 

Turn on the host and check your Apache configuration.

 sudo a2ensite gitlab.conf sudo apachectl configtest 

Did this last test fail?

You can check your Apache configurations before rebooting or restarting Apache.

Otherwise, you can run the command below and visit the URL that you set

 sudo service apache2 reload 

Source: http://jasonrichardsmith.org/blog/gitlab-apache-ubuntu

+9
source

All Articles