WebFaction
Community site: login faq

Hi, I've just started using Fossil, and I loooove the way it works, anyway, the issue is that I've created a Static/CGI/PHP site and I've 2 folders in the document root of the app, each of them with an index.cgi file pointing to the corresponding repo file.

#! /home/user/bin/fossil
repository: /home/user/repos/repository1.fossil

#! /home/user/bin/fossil
repository: /home/user/repos/repository2.fossil

Go here to check and index with links to both. Problem is, just one of them works!!!

I've checked that both cgi files have 711 permissions, and of course I've deleted and recreated the repos via ssh with fossil new repository.fossil multiple times. But I just get error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

On the second repo. I tried to add a third one just to see if any of my process was wrong while creating the second one, but it does not work! Just the first one does. Im'm pretty sure the answer must be pretty stupid, but I can't figure out why, ideas?

asked 16 Jun '11, 11:49

Phrozen
51159
accept rate: 40%

I was just trying to test this, but it looks like you deleted the CGI scripts a few minutes ago. If you set them up again and still have this problem, post a comment here and I'll have another look at them.

(16 Jun '11, 12:18) seanf

Ok it seems it has something to do with the encoding of the file or something like that. I used WinSCP to create the file, folders and to set permissions on the second repo (copying the index.cgi) when that failed, I set the permissions from ssh chmod but I edited the index.cgi using the included editor with WinSCP, seems to me it uses CRLF line endings or some sort of black magic encoding.

Deleted everything, re did using console SSH and nano and all works now :D

BTW just for people trying these, Fossil its an excellent "newish" SCM, with bugtracker, wiki, and more! With webfaction just download the 32bit Linux binary into your bin directory or somewhere in PATH, choose a location for your repo files (outside doc root of web app is prefered) and via a static app CGI you can serve ANY amount of repos you want, it rocks.

permanent link

answered 16 Jun '11, 12:25

Phrozen
51159
accept rate: 40%

Yep, DOS line endings will break CGI scripts. You can fix them in-place by running "dos2unix name_of_your_script.cgi" in a SSH session.

(16 Jun '11, 12:28) seanf
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×108
×31
×19
×3

question asked: 16 Jun '11, 11:49

question was seen: 33,205 times

last updated: 16 Jun '11, 12:28

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM