Установите Gitlab на Cent - PullRequest
       91

Установите Gitlab на Cent

0 голосов
/ 19 апреля 2020

У меня есть веб-сервер Centos 7, на котором Git + Gitolite + GitWeb и Redmine уже успешно работают на apache (httpd). В настоящее время я могу получить доступ к GitWeb и Redmine просто с URL на моей веб-странице (http://localhost/gitweb для gitweb и http://localhost/redmine для redmine), а также из общих папок.

Я попытался установить Gitlab-ee, чтобы улучшить управление своими Git репозиториями со страницы, не удаляя все, просто добавив новый путь к URL-адресу mu (http://localhost/gitlab). Учитывая, что Gitlab работает на nginx, я могу получить доступ к Gitlab, остановив мою службу httpd. Я попытался изменить конфигурацию gitlab в /etc/gitlab/gitlab.rb, добавив эту модификацию

external_url 'http://localhost/gitlab'
web_server['external_users'] = ['apache']
nginx['enable'] = false

, затем я добавил группу gitlab в gitlab- www group:

usermod apache --append --groups gitlab-www

и я отредактировал мой следующим образом:

<VirtualHost *:80>

    #RailsEnv production
    DocumentRoot /var/www/html

    Alias /pm /var/www/redmine/public

    <Location /pm>  
        #PassengerUser sw_srv
        PassengerBaseURI /pm
            PassengerAppRoot /var/www/redmine
            #PassengerResolveSymlinksInDocumentRoot on
    </Location>

   <Directory /var/www/redmine/public>
      # This relaxes Apache security settings.
      AllowOverride all
      # MultiViews must be turned off.
      Options -MultiViews
      # Uncomment this if you're on Apache >= 2.4:
      Require all granted
   </Directory>

    #Alias /git /var/www/git
    <Directory /var/www/git>
       Options       None
       AllowOverride none
       Order         allow,deny
       Allow         from all
    </Directory>

    SuexecUserGroup git git
    ScriptAlias /git/ /var/www/bin/gitolite-suexec-wrapper.sh
    ScriptAlias /gitmob/ /var/www/bin/gitolite-suexec-wrapper.sh

    <Location /git>
        AuthType Basic
        AuthName "Git Access"
        Require valid-user
        AuthUserFile /etc/httpd/conf/git.passwd
    </Location>

    ProxyPreserveHost On

    <Location /gitlab>
      Order deny,allow
      Allow from all

      ProxyPassReverse http://127.0.0.1:8080
      ProxyPassReverse http://localhost/gitlab/
    </Location>

    RewriteEngine on
    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
    RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA]

    # needed for downloading attachments
    DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public

    ErrorLog /var/log/httpd/error_log
    CustomLog /var/log/httpd/access_log combined env=!dontlog

</VirtualHost>

явно перезапускает apache, это не работает.

пожалуйста, кто-нибудь может мне помочь?

...