Monday, June 18, 2012

Library Resources

Resources from the library; Cole, Eric, Network Security Bible, 2nd Edition, Wiley Publishing, 2009, Indianapolis, IN Conant, Jennet. The Irregulars - Roald Dahl and the British Spy Ring in Wartime Washington

Saturday, June 16, 2012

Additional attempts with Hiawatha

Create the directory /var/www/dummy/banshee/public/ and place friendica-friendica-7cfa7a7 in it. Also place index.php, containing phpinfo() in it. Place the banshee url rewriting toolkit in /etc/banshee. Modify the hiawatha.conf file such that it contains /var/www/banshee/public as the website root. Reassign index.php as the startfile. Add the line, UseToolkit = banshee. Uncomment the UrlToolkit block.

Thursday, June 14, 2012

Installing Friendica on Hiawatha once index.php works

Step 18: Enter mysql by typing "mysql -u root -p" at the command line. Enter the password that you selected when you install mysql (see: http://dev.mysql.com/tech-resources/articles/mysql_intro.html).

Step 19: Create a database named Friendika by typing "mysqladmin -u root -p create Friendika".

Step 20: login to mysql. type " mysql> GRANT usage ON *.* TO friend@localhost -> IDENTIFIED BY 'password'; "

Step 21: login to mysql. type "use Friendika".

Step 22: "mysql>GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, FILE -> ON Friendika.* TO friend@localhost;"

Step 23: cd /var/www/dummy/friendica*

Step 24: sudo vi .htconfig.php

Step 25: type :wq

Step 26: type sudo chmod -v 777 .htconfig.php

Step 27: type mysql -u root -p Friendika < /var/www/dummy/friendica-friendica-7cfa7a7/ database.sql (see: http://forums.digitalpoint.com/showthread.php?t=36882)

Oops, it still doesn't work. Well we still haven't created a ssl certificate. Move to the folder /etc/hiawatha and perform the following from root: openssl genrsa -out serverkey.pem 2048 openssl req -new -x509 -days 3650 -key serverkey.pem -out server.crt echo "" >> serverkey.pem cat server.crt >> serverkey.pem echo "" >> serverkey.pem rm -f server.crt and then go to hiawatha.conf and make this true: Binding { Port = 443 SSLcertFile = /etc/hiawatha/serverkey.pem } (as in http://www.hiawatha-webserver.org/howto/bindings) Perhaps I need to copy a .hiawatha file to /var/www/dummy/friendica-friendica-7cfa7a7/. There is a .htaccess file there, but I am not using Apache. Or maybe not?? The mod-rewrite module is used for Apache. Perhaps I need to use banshee. Follow the configuration file in http://www.banshee-php.org/forum/topic/2. I might need to compile php with options for curl, gd, mysql, mbstring, mycrypt, and openssl. Oh, I downloaded php5-mysqlnd from Synaptic Package Manager and restarted localhost/index.php several times (the first time I got a 505, internal server error). When I was able to see the phpinfo() printout I found I had all of the packages that I needed for friendica. Goodnight, tomorrow I will try to install banshee.

Wednesday, June 13, 2012

How to start using php with the Hiawatha webserver (draft)

Step 1: Download Hiawatha by going to http://www.hiawatha-webserver.org/download and downloading the appropriate package such as the debian package at http://files.tuxhelp.org/hiawatha/.

Step 2: If you chose the debian package, run dpkg -i hiawatha*.deb from the command line.

Step 3: Go to Samiux's Almost Secure and Perfect Ubuntu Server blog post, "HOWTO : Highest secured Hiawatha Web Server (6.17.1) on Ubuntu 9.04 Server" at http://secure-ubuntu-server.blogspot.com/2009/10/howto-highest-secured-hiawatha-web.html and repeat step 1. Perhaps all of the packages are not needed, but okay.

Step 4: Construct a default website using HowTo: Defining Websites in on the hiawatha site (http://www.hiawatha-webserver.org/howto/websites). Use Hostname = 127.0.0.1.

Step 5: Uncomment "CGIhandler = /usr/bin/php5-cgi:php,php5" in hiawatha.conf in folder /etc/hiawatha.

Step 6: Uncomment the FastCGIserver block in hiawatha.conf

Step 7: Add "ExecuteCGI = yes" in the default website block in hiawatha.conf.

Step 8: In php-fcgi.conf uncomment: Server = /usr/bin/php5-cgi; 3 ; 127.0.0.1:2005 ; www-data ; /etc/php5/cgi/php.ini

Step 9: Uncomment www-data in hiawatha.conf ?

Step 10: create index.php in /var/www/dummy by typing sudo touch index.php. Make sure that index.php is executable using chmod?

Step 11: Follow the instructions in php-configuration on the hiawatha webserver site (http://www.hiawatha-webserver.org/howto/php_configuration). php.ini should be in the folder: /etc/php5/cgi/php.ini.

Step 12: Run php-fcgi with the kill (-k) option

Step 13: Run php-fcgi with no options to restart the cgi daemons

Step 14: Stop hiawatha with "/etc/init.d/hiawatha stop" from the command line.

Step 15: Start hiawatha with "/etc/init.d/hiawatha start from the command line.

Step 16: Modify index.php in the /var/www/dummy folder by placing the following:

Step 17: If there is a printout at localhost/index.php in the webbrowser, things should be working.