For right now, the webserver setup instructions are specific to running Apache on RedHat? GNU/Linux (although we think the only differece for Debian is that you must substitue ps -ae | grep apache
for /etc/init.d/httpd status
.)
First I logged in as root, and created an spw user. This was done with the commands:
<pre> adduser spw passwd spw </pre>
(note: you need to tell the system what password to create)
I then logged in as spw. I went to the spw home directory. I made sure the web server could read its directory: <pre> cd /home/spw chmod a+rx . </pre>
then I created a subdirectory of that user to put the data in: <pre> mkdir public_html </pre>
I followed the instructions in MakingALocalCopyOfSpw to get a copy of the spw code in that directory and untarred the code finally ran the qsetup.pl command to extract it into that directory.
One of the issues when running a local copy of spw is that you need to make sure you are running a web server.
There is a command to do this as root: <pre> /etc/init.d/httpd status </pre>
Mine came back with the message: <pre> httpd (pid 4394 4393 4392 4391 4390 4389 4388 4387 4384) is running... </pre>
You need to make sure the web server knows to run the spw.pl script. One way of doing this is to add a line like this to your httpd.conf file. (my copy is in is in /etc/httpd/conf
)
<pre> ScriptAlias? /wiki/ "/home/spw/public_html/var/www/" </pre>
This line should be in the same place as any other ScriptAlias? command in the file.
After you make changes to the httpd.conf file you need to make sure Apache sees them. Run as root : <pre> /etc/init.d/httpd restart </pre>
The next thing is to make sure mod_perl isn't being used, and to make sure you have password access to the wiki (for a development wiki, it is appropriate to limit access):
The following is the contents of my .htaccess file: <pre> AuthName? "Wiki Access for SPW" AuthType? Basic AuthUserFile? /home/spw/public_html/pw_spw SetHandler? cgi-script require sample </pre>
As root the following commands create a password file <pre> cd /home/spw/ htpasswd -c -m pw_spw sample </pre>
with the dialog (for adding the user named sample:
<pre> New password: Re-type new password:
Adding password for user sample</pre></b>
HMM this doesn't password protect. I don't know why not
:Did you check your error log? In one password file that I have, the require line is of the form: :<pre>Require user sample</pre>
:I think .htaccess files are case sensitive and very picky, so maybe if you changed it to that it might work?
Before you run a web browser to access the wiki, you need to tell the code where to find stuff.
:qsetup
was supposed to set the directories based on the path that qsetup was run from :Maybe you untarred the thing in /tmp and ran QsetupScript from there instead of from the final installation directory? :Otherwise maybe there's a bug in QsetupScript.
I had to edit the file spw.pl to change the line:
$SPW_BASE_PATH = '/home/spw/tmp'; to $SPW_BASE_PATH = '/home/spw/public_html';
Of course, if you put stuff in a subdirectory named tmp
, you wouldn't have to do that.
anyway, now I can use lynx and access the wiki:
lynx http://localhost/wiki/spw.pl
If all goes well, you should see the opening screen of the wiki.
thanks for writing this