list directory contents on nginx web server
Page 1 of 1
list directory contents on nginx web server
to list directorys this directive can be used!
autoindex on;
example below!
To make directory listing enabled for all site, we can put it like following:
# then restart nginx
autoindex on;
example below!
To make directory listing enabled for all site, we can put it like following:
- Code:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm;
server_name domain.com www.domain.com;
location / {
autoindex on;
}
}
To make only specific folders available for listing, go for it like this:
location /testDirectory/ {
autoindex on;
}
# then restart nginx
- Code:
sudo nginx -s reload
![-](https://2img.net/i/empty.gif)
» Precompiled nginx with rtmp server for linux
» LDAP LINUX LDAP Directory Server Installation and configuration
» PHP MAILING LIST For Linux Web Server Project
» Linux Command List
» Cinema 4D Textures List
» LDAP LINUX LDAP Directory Server Installation and configuration
» PHP MAILING LIST For Linux Web Server Project
» Linux Command List
» Cinema 4D Textures List
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|