DaveM
DaveM

Reputation: 734

can't open fossil repo over web

I've been strugling for a couple of days with this problem, but can't seem to fix it, I think I'm almost there.... but... not quite :(

This is where I am at.

I'm on a headless debian server, running virtualmin / webmin for creating my domains / users etc. I don't know if this will mess things up, but I'm happy to modify the config files manually (via webmin or via ssh/vim).

I am attempting to run fossil as a cgi service over apache.

its an internal site, named as homeserver.net I can reach the default pages just fine, and add in and create links etc as I want to.

Please note that the solution to my problem is at the end of the question.

so the files are located on disk at, which tallys up with my apache document root

/home/homeserver/www

I would like to run fossil to have both the internal site, and later on and dev work that I practice on in separate files. So I created a new directory for these repositories.

/home/homeserver/repos/web/site.fossil
/home/homeserver/repos/dev/ [no repository yet!]

reading the instructions on the fossil page I have inserted a short cgi file called 'fos_repo.cgi' that reads as.

#!/usr/bin/fossil
directory: /home/homeserver/repos
notfound: http://www.homeserver.net/site404.htm

when I open the link to

www.homeserver.net/cgi-bin/fos_repo.cgi 

I get redirected to the 404 page that I have written. So the script is clearly being read and working.

From reading the fossil pages I understand that I should be able to use the following link to open/access the repo.

www.homeserver.net/cgi-bin/repos/web/site

I'm not sure why this isn't working...

so far I have tried the following.

I opened the repository from the cli, and had the server run in the background

fossil server site.fossil &

I though maybee the file should have been inside the main repo directory, not inside a sub directory, so I moved it... it now lives in

/home/homeserver/repos/site.fossil

I tried creating an alias to the file in apache

Alias /home/homeserver/repos/web/site.fossil /home/homeserver/www/repos

When I browse to

 www.homeserver.net/repos/site

I get nothing, but going to

www.homeserver.net/repos/site.fossil

will attempt to downloaded the file (which is a binary)

so I think I'm getting somewhere, but I'm not sure what I'm missing.

I've used fossil before, but I ran it as a local server, and started it up as and when I needed it. I'm running it like this so as I can eventually push the site out to a live VPS (maybe even finish up hosting the fossil site on the VPS also).

ps I really liked fossil when I used it before, and loved the whole integrated wiki and bug tracker, and the fact I could simply copy the file to my external drive to do a backup. Personally don't really want to change to something else, but if I have to....

thanks in advance.

David

Edit: trying other options.

So I thought I would try the single repository method shown on the fossil page, so adjusted my cgi script accordingly.

Now when I navitage to : www.homeserver.net/cgi-bin/fos_repo.cgi I get the following message returned

SQLITE_CANTOPEN: cannot open file at line 30276 of [f5b5a13f73]
SQLITE_CANTOPEN: os_unix.c:30276: (21) open(/home/homeserver/repos)

however if I ssh to the server an start it manually with

fossil server site.fossil

I can get to the server with www.homeserver.net:8081

So I either have a problem with my SQLite usage in apache or something else wrong. Plesse help

Solution

So for reasons of simplicity I've decided that using a single cgi file for each repo is what I am going to go with.

My initial directory structure was as follows:

/home/homeserver/www
/home/homeserver/www/repos
/home/homeserver/www/repos/web # for web site development
/home/homeserver/www/repos/dev # for other development

I think part of my problem was that I was hoping that having the directory: pont to my repos/ location fossil would find the site.fossil file (located in repos/web) and the dev.fossil file (located in repos/deb).

Obviously this didn't work.
The reason I wanted it too look like this was for separation of the information on my system.

For some reason I had decided that pointing fossil as repos/ would give me a nice fossil style front page and links to my repositories automatically. However After having used the directory: version and getting the following error message

Unable to find or open the project repository

I realised that I was still going to need to write my front page to the repositories, and that my expectation was a little too much.

So I've decided to run with a single cgi file pointing to each repo that i need to make.

Upvotes: 2

Views: 494

Answers (1)

ravenspoint
ravenspoint

Reputation: 20565

Instead of

www.homeserver.net/cgi-bin/repos/web/site

try

www.homeserver.net/cgi-bin/repos.cgi/index

Reading your ( very long ) question again, I suggest trying

www.homeserver.net/cgi-bin/fos_repos.cgi/index

Upvotes: 3

Related Questions