Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #7638

Closed
Open
Created Aug 29, 2014 by Administrator@rootOwner

How to use apache reverse proxy bind gitlab

Created by: abcfy2

My gitlab url is http://127.0.0.1:8000, I want to use https://mydomain.com/gitlab to access gitlab with apache 2.4. How to?

I tried many configs but they are all not works.

This is my config:

    <Location /gitlab>
        ProxyPreserveHost on
        ProxyPass http://127.0.0.1:8000
        ProxyPassReverse http://127.0.0.1:8000
    </Location>

When I test with curl:

curl -kv https://mydomain.com/gitlab
> GET /gitlab HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: mydomain.com
> Accept: */*
> 
< HTTP/1.1 302 Found
< Date: Fri, 29 Aug 2014 15:54:14 GMT
< Server: nginx
< Content-Type: text/html; charset=utf-8
< Status: 302 Found
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< Location: http://mydomain.com/users/sign_in
< Cache-Control: no-cache
< X-Request-Id: 7bc38467-d830-4014-bd84-8200f611a37e
< X-Runtime: 0.041407
< Set-Cookie: _gitlab_session=d333f547d291fb0d24acc6e8dd7f301a; path=/; HttpOnly
< Set-Cookie: request_method=GET; path=/
< Transfer-Encoding: chunked
< 
* Connection #0 to host mydomain.com left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
<html><body>You are being <a href="http://mydomian.com/users/sign_in">redirected</a>.</body></html>

You can see the Location is wrong. How to solve this problem?

Assignee
Assign to
Time tracking