cgit is not serving to the right path

28 Views Asked by At

I'm using OpenBSD, and my home page index.html is in /var/www/web, while my cgit is in /var/www/cgit. Right now, my home page is serving correctly, to [website-link]/, but [website-link]/cgit is showing 404, and I'm not sure why.

ext_ip="0.0.0.0"
server "default" {
    listen on "0.0.0.0" port 80

    # serve cgit static files directly: cgit.css & cgit.png
    location "/cgit/cgit.*" {
        root "/"
            no fastcgi
        }

        location "/*" {
        directory index index.html
        root "/web/"
        no fastcgi
    }


    # cgit cgi
    root "/cgi-bin/cgit.cgi"
    fastcgi socket "/run/slowcgi.sock"
}

I tried using different paths, like having the root be "var/www/" instead, or "/var/www/" and also "~/var/www/" but none of those worked. My bak file looks like this for context:

 ext_ip="0.0.0.0"
server "default" {
    listen on "0.0.0.0" port 80

    location "/web/*" {
        directory index index.html
        root "/"
        no fastcgi
    }

    # serve cgit static files directly: cgit.css & cgit.png
    location "/cgit.*" {
        root "/cgit"
        no fastcgi
    }

    # cgit cgi
    root "/cgi-bin/cgit.cgi"
    fastcgi socket "/run/slowcgi.sock"
}

where the home page serves to [website-link]/web, and cgit is [website-link]/

0

There are 0 best solutions below