cannot get cgit display anything except the repo listing page

Torsten Kuehnel net_seeker at web.de
Fri Aug 13 22:03:34 UTC 2021


On Fri, 13 Aug 2021 21:24:58 +0000
Ariel Costas <ariel at costas.dev> wrote:

here comes the content:

HTTP_ACCEPT_ENCODING=gzip, deflate, br
SERVER_NAME=my.domain.com
HTTPS=on
SCRIPT_NAME=/
REDIRECT_STATUS=200
GATEWAY_INTERFACE=CGI/1.1
HTTP_SEC_GPC=1
SERVER_SOFTWARE=nginx/1.14.2
PATH_INFO=/
DOCUMENT_ROOT=/var/www/htdocs/cgit
HTTP_UPGRADE_INSECURE_REQUESTS=1
PWD=/var/www/htdocs/cgit
LOGNAME=www-data
REQUEST_URI=/
PATH_TRANSLATED=/var/www/htdocs/cgit
FCGI_ROLE=RESPONDER
REQUEST_SCHEME=https
HOME=/var/www
LANG=C.UTF-8
QUERY_STRING=
HTTP_TE=trailers
HTTP_ACCEPT_LANGUAGE=de-DE,en-US;q=0.7,en;q=0.3
DOCUMENT_URI=/
INVOCATION_ID=c38ca46505de465a86d38a3900c8c4ad
HTTP_ACCEPT=text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
REMOTE_PORT=47900
HTTP_HOST=my.domain.com
USER=www-data
SERVER_ADDR=85.17.18.15
HTTP_AUTHORIZATION=Basic dG9yc3RlbmRpZXRlcjM5MzpwZVVnJUdEN3RUJjRYZjM4
HTTP_USER_AGENT=Mozilla/5.0 (X11; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0
SHLVL=1
CONTENT_LENGTH=
SERVER_PROTOCOL=HTTP/2.0
SERVER_PORT=443
SCRIPT_FILENAME=/var/www/htdocs/cgit/debug.cgi
JOURNAL_STREAM=9:39445051
REMOTE_ADDR=87.176.40.180
DAEMON_OPTS=-f
HTTP_CACHE_CONTROL=max-age=0
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
CONTENT_TYPE=
REQUEST_METHOD=GET
_=/usr/bin/printenv

so that's for the root url of https://my.domain.com with the debug script (url domain changed for obfuscating reasons).

> It does seem like a problem when calling the CGI script. Perhaps you
> could debug what cgit is getting from your NGINX?
>
> You could try creating a new file `/var/www/htdocs/cgit/debug.cgi` with
> the contents:
>
>     #!/bin/bash
>     echo "Content-Type: text/plain"
>     echo ""
>     printenv
>
> What this script does is: run bash, respond with the Content-Type header
> and a plaintext body containing all the environment variables passed by
> NGINX.
>
> Give it execution permissions and owned by www-data, then point NGINX to
> that script and visit the site. Check the QUERY_STRING, PATH_INFO and
> HTTP_HOST and see if they are the correct ones. Is there something strange?
>
> --
> Ariel Costas (https://costas.dev)
> Encrypt your email -- https://emailselfdefense.org/
>   GnuPG public key -- https://costas.dev/pgp


--
Torsten Kuehnel <net_seeker at web.de>


More information about the CGit mailing list