Home Archive RSS Login

I learned something new today

Famous Scientists Who Believed in God

Some good links to read:
http://www.godandscience.org/apologetics/sciencefaith.html
http://www.answersingenesis.org/creation/v13/i4/wright.asp

In today's world, people trust the popular wiki sites and search engines for everything

Continue reading »
Author: Prit -  Date: 03 Sep 2010 09:48
Tags: christian -  Visits: 4808 -  No Comments




Fossil SCM for Pritlog

SCM stands for Software Configuration Management.

I have been maintaining Pritlog versions using manual versioning. Recently, I started looking into moving Pritlog into a proper version control system for easier development and sharing

Continue reading »
Author: Prit -  Date: 02 Sep 2010 14:32
Tags: scm,programming -  Visits: 5597 -  No Comments




Hiawatha - a secure web server

Quotes from Hiawatha website:

Introduction

Hiawatha is an open source webserver with a focus on security. I started Hiawatha in January 2002. Before that time, I had used several webservers, but I didn't like them. They had unlogical, almost cryptic configuration syntax and none of them gave me a good feeling about their security and robustness. So, I decided it was time to write my own webserver. I never thought that my webserver would become what it is today, but I enjoyed working on it and liked to have my own open source project. In the years that followed, Hiawatha became a fully functional webserver.

Project goals

Because of my great interest in IT security, I paid extra attention to security while I was working on Hiawatha. Beside all the default security measures you can expect from a modern webserver, there are a lot of security features in Hiawatha you won't find in any other webserver. Many of them started as an experiment, but in the meantime, most of them have proven to be very usefull.

A second thing I wanted my webserver to be is easy-to-use. This resulted in a readable configuration syntax and not having to be a HTTP or CGI expert in order to get Hiawatha running.

I was reading the blog of Hugo Leisink and came across a performance study that was posted there. I have been using Hiawatha on several of my test servers and recently a production server. I love it for its security features, ease of setup and performance. You can find the link to the PDF document below. I just used the same link provided on Hugo's blog. As you can see from the study, Hiawatha does a great job in performance too. And coupling this with security and ease of use, why would anyone want to use another web server? 

Link to the study:
http://www.hiawatha-webserver.org/files/PHP_web_serving_study.pdf

You can also read my testimony of Hiawatha on how we reduced excessive and abusive bandwidth usage on our server from over 1000 GB/day to 40 GB/day.

Link to the testimony:
http://www.hiawatha-webserver.org/about

Author: Prit -  Date: 04 Aug 2010 13:23
Tags: server,linux -  Visits: 20005 -  No Comments




Install MongoDB, Xdebug and PHP 5.3.3 on Ubuntu 9.10

Here is a nice video that shows you how to install PHP 5.3.*, Xdebug, MongoDB and getting started with Lithium, the most RAD framework for PHP 5.3+.
http://vimeo.com/8005503

I will note down some of the steps here anyway on how I did on Ubuntu. I started from Ubuntu Server installation and hence already had Apache on the system. Hence, some steps might be different.
sudo apt-get install apache2-prefork-dev

Now the web server must be running at http://localhost. The document root that is setup by default on Ubuntu is /var/www. 

1. PHP 5.3.3

Now head over to the php website and grab the PHP 5.3.* source. At the time of writing this post, it was 5.3.3. Here is the command line I used:
cd ~
wget http://www.php.net/get/php-5.3.3.tar.gz/from/us.php.net/mirror
tar -xzvf php-5.3.3.tar.gz
cd php-5.3.3

You can create a config.clean script in this directory and add the lines shown.
nano config.clean
and paste the following lines:
#! /bin/sh
#
# ..-. .- .. .-..  ..-. .- ... -
#
'./configure'
'--prefix=/usr'
'--with-config-file-path=/etc/php5/'
'--with-config-file-scan-dir=/etc/php5/'
'--with-apxs2=/usr/bin/apxs2'
'--with-bz2'
'--with-curl'
'--with-gd'
'--with-iconv'
'--with-mysql'
'--with-mysqli'
'--with-openssl'
'--with-pcre-regex'
'--with-pdo-mysql'
'--with-pear'
'--with-xmlrpc'
'--with-xsl'
'--with-zlib'
'--enable-ftp'
'--enable-mbstring'
'--enable-soap'
'--enable-sockets'
"$@"
Now you can run the following:

sudo apt-get install libxml2-dev libbz2-dev libcurl4-gnutls-dev libjpeg62-dpg libpng12-dev libxslt1-dev

sudo sh ./config.clean

make -i install

Now PHP 5.3.3 installation is complete. 

2. Xdebug Installation


# install dependancies
sudo apt-get install php5-dev

#install xdebug
sudo pecl install xdebug

# copy and start editing php.ini to add xdebug module
sudo cp /etc/php5/apache2/php.ini /etc/php5
sudo nano /etc/php5.ini 
# Add the following to the end:
[xdebug]
zend_extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so

3. MongoDB Installation


sudo mkdir -p /data/db

# Download Mongo
curl http://downloads.mongodb.org/linux/mongodb-linux-i686-1.4.4.tgz > mongo.tgz
tar xzf mongo.tgz
cd

# start mongod server
bin/mongod

# start mongo client 
bin/mongo

Now you can try out mongodb by referring to the documentation on their website at http://mongodb.org
Author: Prit -  Date: 27 Jul 2010 18:36
Tags: mongodb,php -  Visits: 8482 -  No Comments




MongoDB - Nginx module for serving files from MongoDB's GridFS

Nginx is a fast web server that is especially popular for its low footprint even under heavy loads. I have tested this on few server setups and found this to be a true statement. 

As mentioned on an earlier post, you can store files in MongoDB using GridFS. This module adds the functionality in Nginx to serve files directly from MongoDB's GridFS as if it were being served from a regular directory. You can get all the information and the files from the following git location:
http://github.com/mdirolf/nginx-gridfs

This is the configuration I tried:
location /gridfs/
    gridfs my_db
           field=filename
           type=string
           user=foo
           pass=bar;
    mongo 127.0.0.1:27017;
}

When a user visits my site and goes to http://mysite/gridfs/image1.jpg, nginx takes this file from my mongodb database my_db and serves it. 


Author: Prit -  Date: 27 Jul 2010 11:22
Tags: mongodb -  Visits: 57077 -  No Comments




Pages: ... [2] [3] [4] [5] [6] [7] ...