Question
I've been troubleshooting my TWiki install for a while now, and I can't get around this latest problem:
I have it so that the index.html file loads, but this is just links to the readme, licencse, etc. I've tried loading
http://wiki.sahadeva.com/bin/view
, but that doesn't seem to "run" anything, it just loads the 'view' file in plain text. I've tried setting the permissions of the file to 775, but that does nothing. I assume I have everything in the right place and have done the reccomended server side SSH stuff (I think), but nothing is happening.
I've looked through Donkins dreamhost install guide and the standard install guide, and have done what I can with the little knowledge that I have, but I'm stumped. Any help would be very very much appreciated.
Also, is it be possible just to make a wiki package for thre dreamhost setup?
here is the readout when I go to
http://wiki.sahadeva.com/bin/testenv
(I'm not sure if its actually running a script or justing giving me the plaintext).
- Yep. That was just the text version of the testenv script so I've deleted it here. - LB
Environment
--
SahadevaHammari - 11 Apr 2005
Answer
I'm glad to help you sort out your installation on dreamhost since I've gone through it a number of times. It might take a couple rounds back and forth but let's start with getting the scripts to run. As you suspected, when you're entering a url to one of the scripts, it's just displaying the script file. In order to get the dreamhost servers to recognize the scripts as scripts (even without suffixes like .pl), there a little configuration in the sample .htaccess file thats included in the bin directory (it's named .htaccess.txt so that it's not active). HOWEVER, I do not recommend that you turn on the sample .htaccess file yet becuase it will turn on twiki authentication and thereby block you from editing your own site. I get around this by creating a temporary, minimized .htaccess file in the bin directory has only has this:
SetHandler cgi-script
AuthUserFile /home/username/domain_name.com/data/.htpasswd
AuthName 'Enter your WikiName: (First name and last name, no space, no dots, capitalized, e.g. JohnSmith). Cancel to register if you do not have one.'
AuthType Basic
Once you've done that, the scripts will start working. On a side note, regarding turning on the authentication, I'm not sure the sequence described in
TWikiInstallationGuide is completely clear on this, since I hear people locking themselves out of their new installation with some regularity. My recommended sequence is this:
- Create the minimized htaccess file discribed above. This will allow you to edit files without logging in.
- Do step 3 under TWiki/TWikiInstallationGuide#Enabling_Authentication_of_Users. (Overwriting the content of TWikiRegistration with content of TWikiRegistrationPub.)
- Register yourself.
- Add yourself to TWikiAdminGroup.
Then when you proceed with turning on authentication, you won't lock yourself out of adding yourself to TWikiAdminGroup.
Regarding redirecting folks from the top level index.html file to /bin/view, that's accomplished by a line in the sample top-level .htaccess file that reads:
Redirect /index.html http://your-domain.com/bin/view
I thinks that enough for now. Best of luck!
--
LynnwoodBrown - 11 Apr 2005
Thanks so much for your help. here is my .htaccess file:
SetHandler cgi-script
# The first path here must be a URL path, not a file pathname
Redirect /index.html http://wiki.sahadeva.com/bin/view
# The path here must be a file pathname, not a URL - first part should
# match the $dataDir setting in TWiki.cfg
AuthUserFile /home/sahadeva/wiki.sahadeva.com/data/.htpasswd
AuthName ByPassword
AuthType Basic
I get a "500 internal service error" when I try to load the page after updating the .htaccess file:
The server encountered an internal error or misconfiguration and was unable to complete your request.
the apache error logs says:
[Mon Apr 11 13:14:29 2005] [alert] [client 164.67.48.36] /home/sahadeva/wiki.sahadeva.com/bin/.htaccess: SetHandler takes one argument, a handler name
any thoughts? it seems to be running the script, but something is amiss.
--
SahadevaHammari - 11 Apr 2005
I think we're making process. Your .htaccess file looks fine.
On the 500 internal service error, it sounds like permissions on the scripts. Make sure you CHMOD all the scripts in bin directory to 755.
I'm sorry I don't know what to make of the apache error log. The
SetHandler looks like it only has one arguement - unless it's somehow running together the lines. Maybe someone else could comment on this.
(BTW, you don't have to use "br" in twiki editing for new paragraphs. Just do 2 returns.)
--
LynnwoodBrown - 11 Apr 2005
Opps - noticed one more thing in .htaccess file. The "redirect" line should be in your top level directory htaccess file, not the bin directory one.
--
LynnwoodBrown - 11 Apr 2005
I manually changed the permissions to everythign in the /bin directory to 775 (I don't really know how to CHMOD the directory, what does that mean? I've tried to do everything in
this guide, but I don't know if I've done the SSH stuff right.
I'm still getting the 500 internal service error. does everything need to have permissions set to 775? If so, how does one do this?
Also, I've received a few emails from the Cron Daemon at dreamhost saying "/bin/sh: ./statistics/TWiki: Not a directory", could this have something to do with it?
many thanks.
--
SahadevaHammari - 11 Apr 2005
Hmmm. I'm getting a little stumped. First of all, did you take the redirect out of your /bin/.htaccess but leave the SetHandler? I'm wondering this because when I go to your testenv url, I'm still seeing the script text.
CHMOD is just a unix command for setting the file permissions. And just to be clear, ONLY the scripts should have permission set to 775 (or 755). The htaccess file and setlib.cfg should be set to 644.
Don't know what to say about the Cron Daeman error except let's not worry about getting that working until we get the basic scripts working OK.
--
LynnwoodBrown - 12 Apr 2005
yeah, the /bin/.htaccess looks like this now
SetHandler cgi-script
# match the $dataDir setting in TWiki.cfg
AuthUserFile /home/sahadeva/wiki.sahadeva.com/data/.htpasswd
AuthName ByPassword
AuthType Basic
I don't know if the 'AuthName' needs to be changed (I don't think I have a
WikiName registered yet?).
If you dig we could hop on some chat protocall (I would be forever grateful either way)
--
SahadevaHammari - 12 Apr 2005
Something just occurred to me: are you using a Mac and did you create the htaccess file locally and then upload it to your site? If so, we might be running into problems of the different way the systems deal with new lines. That would explain why it did not read the SetHandler directive before: it was running that line together with the next. I saw on your site that you use Transmit. Try deleting your htaccess file and create a new htaccess in the bin directory using Transmit's internal editor. Then copy and paste the text I gave you above and save it. Just a shot in the dark...
--
LynnwoodBrown - 12 Apr 2005
Using a chat might be good. What do you use?
--
LynnwoodBrown - 12 Apr 2005
--
SahadevaHammari - 12 Apr 2005
I have skype (sahadeva) aim (sahadevaham) and msn (sahadevaham) pick your poison, or I can sign up for any service you like.
--
SahadevaHammari - 12 Apr 2005
Skype is good. I just im you on it but no response. Actually, I'm not sure tonight will be that good. I'm actually sick as a dog with the flu and will probably be crashing soon. Maybe we can touch base tomorrow.
--
LynnwoodBrown - 12 Apr 2005
that sounds great. sorry, I had to jam about an hour after I sent my last message, and I had no internet. I'll try and be on whenever I can tomorrow. I hope you feel better!, I hear dog flu is pretty bad : )
--
SahadevaHammari - 12 Apr 2005
also, it appears that wiki.sahadeva.com/bin/testenv is now trying to run the script, but getting the same error.
--
SahadevaHammari - 12 Apr 2005
Which represents progress

Let's try to connect on Skype. My id is lynnwoodbrown.
--
LynnwoodBrown - 12 Apr 2005