Enable Directory Listing in Nginx Webserver

Here is a simple way to enable directory listing in Nginx Webserver.
I have a subdomain repository.wowtutorial.org and i want repository.wowtutorial.org to have ability to listing a directory.

All we need to do just modify the vhosts or nginx.conf
Add autoindex on;

Please see the example below

Example :

#nano /usr/local/etc/nginx/vhosts/repository.wowtutorial.org

server {
        listen  80;
        server_name  repository.wowtutorial.org;
        autoindex on;

        location / {
            root   /home/xxx/repository;
            index  index.php index.html index.htm;
        }

        location ~ \.php$ {
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_param  SCRIPT_FILENAME  /home/xxx/repository$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_script_name;
                include        /usr/local/etc/nginx/fastcgi_params;
        }

        location ~ /\.ht {
            deny  all;
        }
}

Share

Linux Distributions

A must read to learn and know the origins of different flavors of Linux distros.

You'l end up wondering 'why didn't I notice this before?…'  🙂

http://en.wikipedia.org/wiki/List_of_Linux_distributions

http://www.webmin.com/support.html

Share

PowerDNS Cache dump in CSV

The objective is simple, a periodic cron cache dump of powerdns recursor on a setup.

1. create a shell code as below using nano-

#nano /usr/local/bin/pdns-cache-dump.sh

#!/bin/sh
DAY=`/bin/date +%Y%m%d`
TFILE="/var/log/pdns-cache/$(basename $0).$DAY.csv"
rec_control dump-cache $TFILE
echo "cache dump completed, dump script by rumi (hasan.emdad@mango.com.bd)"

Read more

Share

endian: How to configure the OpenVPN client on a Linux workstation

Go to VPN > OpenVPN Server

Download the CA certificate using the link Download CA Certificate

Save the certificate locally as, lets say, /home/user/cacert.pem

Start the OpenVPN client using the following command line:

openvpn –client –pull –comp-lzo –nobind –dev tap0 –ca /home/user/cacert.pem –auth-user-pass –remote your.remote.efw

Share

Cacti: How to install on Centos 5.x server

Required software(s)

You need to install the following software on RHEL / Fedora / CentOS Linux:

MySQL Server : Store cacti data.

NET-SNMP server – SNMP (Simple Network Management Protocol) is a protocol used for network management.

PHP with net-snmp module – Access SNMP data using PHP.

Apache / lighttpd / ngnix webserver : Web server to display graphs created with PHP and RRDTOOL.

Read more

Share

rec_control man section

Name

rec_control – control pdns_recursor

Synopsis

rec_control [–help] [–socket-dir] [–socket-pid] command ..

Description

rec_control(1) allows the operator to control a running instance of the pdns_recursor.

The commands that can be passed to the recursor are described on http://doc.powerdns.com/rec-control.html

Examples

To stop the recursor by hand, run:

# rec_control quit

To dump the cache to disk, execute:

# rec_control dump-cache /tmp/the-cache

Options

–help

provide this helpful message

–socket-dir

Where the controlsocket will live

–socket-pid

When running in SMP mode, pid of pdns_recursor to control

Read more

Share