0

I installed first the gitlab-ce on my local desktop ubuntu (used as a server) and it was okay and able to connect to it through IP address http://192.168.1.6/ from other computers on the same network of course

Now and after installing the apache server I'm not able to access to gitlab-ce and instead of the gitlab page I see the apache page !

what I want to do is to make gitlab accessible through http://192.168.1.6/gitlab , is it possible ?

here the actual configuration I have :

/etc/gitlab/gitlab.rb

external_url 'http://gitlab.mostafa-home.com:9999'
# Disable nginx
nginx['enable'] = false
# Give apache user privileges to listen to GitLab
web_server['external_users'] = ['www-data']

/etc/apache2/sites-enabled/000-default.conf

<VirtualHost *:80>
    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    #ServerName www.example.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

thanks

2 Answers2

0

Enable mod_proxy and mod_proxy_http, and add a proxypass directive to your configuration:

ProxyPass "/gitlab" "http://localhost:9999/"
Gerard H. Pille
  • 2,569
  • 1
  • 13
  • 11
0

Hello mostafa i need to have 50rep+ to answer your comment. So i put my commenbt in answer here.

First create your configuration file :

sudo nano /etc/apache2/sites-available/gitlab

Create a symlink to sites-enabled :

sudo ln -s /etc/apache2/sites-available/gitlab /etc/apache2/sites-enabled/gitlab

Add what you have to add in the conf file.

Restart apache server :

systemctl restart apache2

Check status of apache server :

systemctl status apache2
Julien J
  • 123
  • 7