Skip to content

Add example server configurations to Troubleshooting #941

@fdavies93

Description

@fdavies93

When I was setting up my server, I found that the config for gitlist can be a little unintuitive. The main reason for this is that public/assets is contains static assets which need to be served through a fileserver, while all other routes need to be served through index.php, which itself needs to proxy to php-fpm. I managed to figure this out but had to cobble together relevant info from all over the internet.

I can see a few issues which may be related, for example #938.

To fix this, add a suggested configuration section to Troubleshooting. Here is an example for nginx:

Example Configurations

nginx

It's recommended to use php-fpm for this. Make sure the fastcgi_pass directive specifies the correct port or unix socket.

server {
                listen 80;
                root /var/www/gitlist/public;
                location / {
                        fastcgi_pass unix:/run/php/php8.1-fpm.sock;
                        fastcgi_index index.php;
                        fastcgi_param SCRIPT_FILENAME /var/www/gitlist/public/index.php;
                        fastcgi_param QUERY_STRING    $query_string;
                        try_files $uri $uri/ /index.php =404;
                        fastcgi_param PATH_INFO $path_info;
                        include fastcgi.conf;
                }

                location /assets {
                        try_files $uri $uri/ =404;
                }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions