Apr 26, 2011

Apr 7, 2011

list directori on NginX

-- goal --
we can list a directory under web root folder

-- 1 --
edit /etc/nginx/sites-enabled/default
sudo vi /etc/nginx/sites-enabled/default
-- 2 --
add this following config :
server {

        listen   80; ## listen for ipv4
        listen   [::]:80 default ipv6only=on; ## listen for ipv6
        server_name  localhost;
        autoindex on;         # add this to your config
        access_log  /var/log/nginx/localhost.access.log;
--3--
then restart your services:
sakti@sakti-sama:~$ sudo /etc/init.d/nginx restart
Restarting nginx: nginx..
-- test&jajal --