My nginx config file is as follows:
server {
...
location / {
auth_request /custom_auth
}
location /custom_auth {
proxy_pass http://localhost:9123;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header Host $host;
proxy_set_header X-Original-URI $request_uri;
Thank you for your suggestion. I changed gitlab as follows and removed
default from sites-enabled. This worked.
server {
listen 0.0.0.0:80 default_server;
listen [::]:80 default_server;
server_name abcd.com; ## Replace this with something like
gitlab.example.com
server_tokens off; ## Don't
I installed gitlab in behind nginx reverse proxy and it worked fine. Added
the below configuration. Note that location path was changed.
upstream gitlab-workhorse {
server unix:/var/opt/gitlab/gitlab-workhorse/socket;
}
server {
listen 0.0.0.0:80 default_server;
listen [::]:80 default_serve