Search

User login

Poll

What is your favorite DB Server ?:
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
1 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

My YM

Author Information

sentono
Offline
Last seen: 2 days 14 hours ago
Joined: 09/21/2007

Alexa Rank

Who's online

There are currently 0 users and 16 guests online.
Home
  • warning: Invalid argument supplied for foreach() in /usr/home/wowtutorial/public_html/sites/all/modules/adsense_injector/adsense_injector.module on line 352.
  • warning: Invalid argument supplied for foreach() in /usr/home/wowtutorial/public_html/sites/all/modules/adsense_injector/adsense_injector.module on line 35.

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 :

#pico /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;
        }
}


Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Recent comments

Facebook Fans

Sponsors

Online Store

Tag Cloud