4. Install PPLOG
I copied it from its previous home, then set permissions:
# cp -a /root/httpd/hiawatha/blog /root/Web-Server/
# chown -R webuser:webgroup /root/Web-Server/blog
Then open /root/Web-Server/blog/pup_pplog.pl in a text editor and replace all occurences of "/root/httpd/hiawatha" with "/root/Web-Server".
The Perl script 'pup_pplog.pl' needs to have permissions rwx r_x r__ (754). All other files should be rw_ r__ r__ (644), directories rwx rwx r_x (775). I don't know if these are optimum from a security viewpoint.
5. Setup Hiawatha to run a Perl script
Stop hiawatha, as it was running from previous test...
# hiawatha.run stop
ServerId = webuser
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log
Port = 80
Interface = 127.0.0.1
Hostname = 127.0.0.1
WebsiteRoot = /root/Web-Server
StartFile = index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log
#add this stuff to get a perl script working (pplog)...
MimetypeConfig = /etc/mime.types
CGIhandler = /usr/bin/perl:pl
CGIextension = pl
ExecuteCGI = yes
Run the little script that starts and stops hiawatha and pplog:
...yay, it works!
I did a test post, and I see that it gets created in blog/posts with permissions rw_ r__ r__ and owner:group = root:webgroup. I'm not sure that I understand that, as I thought that hiawatha is running as user 'webuser' and that would therefore be the owner of the file. Whatever, it works.
Now I have to get all of this into PET packages for the next Puppy...
Comments:Posted on 17 Jul 2009, 21:59 by BarryK
Good, I built a pup, and PPLOG works. Another one bites the dust!
Posted on 17 Jul 2009, 23:21 by ricstef
...yay, Barry !!!
Thank you for spending so much time to unravel this puzzle. I especially appreciate the detailed explanation. This helps me to understand Hiawatha better. ;)