I have gitlab running under plesk and I was using it under apache24 proxypass. I couldn’t get the web terminal working, so I switched the proxy to nginx.
Now, all seems good and it’s running and everything is working, except that the home page (/) is not being displayed, I get a 404 there. There is a unmatched_route error shown in the logs.
==> /var/log/gitlab/gitlab-rails/production.log <==
Started GET "/index.html" for 62.167.83.226 at 2020-02-17 16:18:36 +0100
Processing by ApplicationController#route_not_found as HTML
Parameters: {"unmatched_route"=>"index"}
Completed 404 Not Found in 74ms (Views: 6.1ms | ActiveRecord: 5.0ms | Elasticsearch: 0.0ms)
Started GET "/favicon.ico" for 62.167.83.226 at 2020-02-17 16:18:36 +0100
==> /var/log/gitlab/gitlab-rails/production_json.log <==
{"method":"GET","path":"/index.html","format":"html","controller":"ApplicationController","action":"route_not_found","status":404,"duration":73.62,"view":6.11,"db":4.96,"time":"2020-02-17T15:18:36.721Z","params":[{"key":"unmatched_route","value":"index"}],"remote_ip":"62.167.83.226","user_id":2,"username":"andy","ua":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.100 Safari/537.36","queue_duration":3.75,"correlation_id":"tG4RpGxXYD7","cpu_s":0.2080945199999995}
My Proxy code:
location / {
client_max_body_size 0;
gzip off;
## https://github.com/gitlabhq/gitlabhq/issues/694
## Some requests take more than 30 seconds.
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:8081;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
Any ideas?