Web-server – How to list files under a URL to a directory on a web/HTTP server

web servicesweb-server

I was wondering if there is a tool for listing files under a URL to a directory on a web/HTTP server?
For example, is it possible to list files under a directory?

  1. Does running WebDav on a HTTP server provide services to enumerate resources on the HTTP server?

  2. Why can my browser list files under a directory?

  3. When using Google search, is it possible to search for something among all Google-accessible files under a URL for a directory, using some Google query?
    For example, can Google query "Appendix site:cs.helsinki.fi/group/nodes/kurssit/kj/" find all the Google-crawled files under the directory containing the word "Appendix"?

Thanks.

Best Answer

This is an answer to your question #2.

URLs are simply pointers to resources, which sometimes can be files or directories. It all depends on the actual web server configuration what response is returned to URLs.

If we are restrict discussion to web servers which only serve files from filesystem, then it depends on the webserver configuration if they allow listing directory contents or not.

In nginx webserver, it is the ngx_http_autoindex_module that creates directory listing for visitors. Apache2 has a similar setting.

In general, directory indexes should be disabled, because they provide no value to the application and are a security risk.

Related Topic