webdesserts
webdesserts

Reputation: 1023

How to list files in a directory on an https server

I have set up a connection with a rather large https server and I am able to download files if I know their name and location.

However, what I would like to do is search through the https file server and only pull out html files. I know how to do this in normal directories, but is there a way to list out files and directories in an https file server kinda like you would do an ls or dir?

I am unfamiliar with http servers in general so explanations are appreciated.

Thanks!

Upvotes: 0

Views: 1986

Answers (1)

the Tin Man
the Tin Man

Reputation: 160571

To list files, or be able to access them using HTTP from that list, you have to have a CGI, or some sort of plugin, that will give you a listing of the directories available.

That isn't something that is allowed by default as it can be a major security hole on a system. Imagine the problems someone could cause if they could browser through the /etc hierarchy on a *nix system and retrieve the password information, or through database files, etc.

So, by default no browsing of the file system is allowed. You can enable that many different ways, depending on the HTTPd server and the modules supplied with it or that have been added.

Writing such an interface isn't that hard either, but its better to rely on pre-built wheels, rather than reinvent your own.

Upvotes: 1

Related Questions