How to install

Debian based

apt-get install apache2
/etc/init.d/apache2 start

Redhat based

yum install httpd
/etc/init.d/httpd start

How to run on Mac OS X only locally

See here.

How to permit an access only from the localhost

diff httpd.conf

< Listen
> Listen 80

How to authentication with user name & password

Make password file:

cd path_to_password_file_dir
htpasswd -c filename username

Edit the configuration file:

cd /etc/httpd/conf
emacs -nw httpd.conf
<Directory "/var/www/html">
    AllowOverride AuthConfig
    AuthName "Enter username and password"
    AuthType Basic
    AuthUserFile path_to_password_file_dir/filename
    AuthGroupFile /dev/null
    require valid-user


/etc/init.d/httpd restart

How to make a python doable

<Directory "/var/www/cgi-bin">
    AllowOverride None
    Order Allow,Deny
    Allow from all
    Options ExecCGI FollowSymLinks
    AddHandler cgi-script .py
    SetEnv PYTHONPATH "/path_to_pythonpath/polarbear_devel"

How Not to display "File does not exist: /var/www/favicon.ico"

Redirect 404 /favicon.ico
<Location /favicon.ico>
 ErrorDocument 404 "No favicon
< /Location>