Gitlab フロントエンドのパブリック「chrooted」

Gitlab フロントエンドのパブリック「chrooted」

サーバーが2台あります:

  • 1つ目: gitlab + apache proxyを内部ネットワークドメインgit.developmentに含めます
  • 2番目: パブリックドメイン git.mydomain.com 上のフロントエンドのみの nginx サーバー

2 番目のサーバーを使用して、gitlab のディレクトリ「public」に「chroot」したいです。

パブリック Web サーバーのディレクトリ「public」ベース: git.development/public ----> git.mydomain.com

サインインせずにベースにリダイレクト: git.mydomain.com/users/sign_in ----> git.mydomain.com

現時点では部分的なセットアップがあります:

サーバー 1 上の apache (問題なく動作)

<VirtualHost *:80>

    ServerAdmin [email protected]
    ServerName git.development
    ProxyRequests Off

    <Proxy http://127.0.0.1:8082/*>
            Order deny,allow
            Allow from 192.168.0. 127.0.0.1
    </Proxy>

    ProxyPreserveHost On

    ProxyPass /uploads !
    ProxyPass /error !
    ProxyPass / http://127.0.0.1:8082/

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

    # Modify path to your needs (needed for downloading attachments)
    DocumentRoot /home/git/gitlab/public

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

nginx を搭載した 2 番目のサーバー (ほぼ動作します):

server
{
    listen 80;
    access_log off;
    server_name git.mydomain.com;

    # select the correct apache subdomain
    proxy_set_header  Host  git.development;

    rewrite ^/public(/.*)$ $1 last;

    location / {

            proxy_pass http://git.development/public/;
            proxy_cache cache;
            proxy_cache_valid 12h;
            expires 12h;
            proxy_cache_use_stale error timeout invalid_header updating;

    }

    location ~*^.+(swf|ttf|woff|jpg|jpeg|gif|png|ico|css|txt|mid|midi|wav|bmp|rtf|js)$ `{`
            proxy_pass http://git.development;
            proxy_cache cache;
            proxy_cache_valid 10d;
            expires max;
    }

}

実際には、GitLab の動作を妨げずに、あるディレクトリから別のディレクトリにパブリック Web サーバーを適用することが技術的に可能かどうかはわかりません。おそらく、この種の問題には適した方法ではないかもしれませんが、同様の問題に関するリンクが役立つかもしれません。

関連情報