Want to access my gitlab instance (docker container)
running on internal server: http://192.168.1.8:30000,
through nginx reverse proxy via external url
https://mydomain/git/
GitLab instance works fine and without any problem from internal
http://192.168.1.8:30000
Current "problem" behaviour is like:
When I access
https://mydomain/git/
The url is directed to
https://mydomain/users/sign_in.
The right url should be (for my unterstanding)
https://mydomain/git/users/sign_in.
There must be something incorrect with my reverse proxy config (see below):
Nginx reverse proxy config:
location ^~ /git/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://192.168.1.8:30000;
proxy_read_timeout 90;
proxy_redirect http://192.168.1.8:30000 https://mydomain/git;
}
I sounds like my proxy_redirect ist not working the right way.
Nginx test output says ok:
sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Nginx start without any errors.
Could anybody give me a hint, what's wrong in my reverse proxy configuration.
Thanks in advance brx
running on internal server: http://192.168.1.8:30000,
through nginx reverse proxy via external url
https://mydomain/git/
GitLab instance works fine and without any problem from internal
http://192.168.1.8:30000
Current "problem" behaviour is like:
When I access
https://mydomain/git/
The url is directed to
https://mydomain/users/sign_in.
The right url should be (for my unterstanding)
https://mydomain/git/users/sign_in.
There must be something incorrect with my reverse proxy config (see below):
Nginx reverse proxy config:
location ^~ /git/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://192.168.1.8:30000;
proxy_read_timeout 90;
proxy_redirect http://192.168.1.8:30000 https://mydomain/git;
}
I sounds like my proxy_redirect ist not working the right way.
Nginx test output says ok:
sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Nginx start without any errors.
Could anybody give me a hint, what's wrong in my reverse proxy configuration.
Thanks in advance brx