Project

General

Profile

[UserError] subdirectory not accessible

Added by phil123456 over 8 years ago

Hi

(I am not sure if this is a french or english forum...so I'll post in english like everyone else)

I installed the latest version of lighthttpd on a debian 2.5 for static files only (no php, no db, just images)

I could access the index page, but no subdirectories, so I found on the web I should add this to the config file

dir-listing.activate = "enable" 
dir-listing.hide-dotfiles = "enable"
dir-listing.encoding = "utf-8"

it works, but now anyone can browse the content and see directories structure

is there a way to avoid this ? (without creating a virtual host like with apache)

thanks


Replies (8)

RE: subdirectory not accessible - Added by nitrox over 8 years ago

I am a bit confused.

/static.png  <- works?
/sub/static.png  <- does not work?

If you enable dir-listing, you have enabled dir-listing. You don´t need it to be enabled to access /sub/static.png, just point your browser to the file within the subdir.

RE: subdirectory not accessible - Added by phil123456 over 8 years ago

I did not want to enable dir listing

for some reason someone had the same issue

I am more used to apache, so I dont know why I need to enable dir listing to access subdirectories

RE: subdirectory not accessible - Added by stbuehler over 8 years ago

Did you test with curl? Output from curl? strace output while request is running? The first "report" you mention has an strace, but he didn't give it a config file, and didn't actually run the requests -> completely useless.

RE: subdirectory not accessible - Added by nitrox over 8 years ago

There is a difference in requesting a file in a subdir and showing the content of a subdir.

If you need to access a known file in a subdir /sub/static.png, you just point your browser at it. If you need to have the content of that subdir /sub/ to be listed, you have to enable dir-listing.

So that are basically two different things, choose whats appropriate for your setup.

If the request to /sub/static.png fails for some reason with dir-listing disabled, provide the information stbuehler requested.

RE: subdirectory not accessible - Added by phil123456 over 8 years ago

dude, I dont know if you're taking pleasure into this but I am not going to enter your sicks and twisted game

with a default install on debian 2.5 of lighthttpd I can only access the root files, not the one in the directory

that's it, that's the whole idea of the issue I need help for

a simple 2 sec search in google, you'll find dozens of people having the same issue

you dont get it , you dont get it

I'll find help somewhere else, or I'll install apache, at least it works

RE: subdirectory not accessible - Added by stbuehler over 8 years ago

"Debian 2.5". Pay someone else to do it, as you obviously have no fucking idea what you are doing. We're done here.

RE: subdirectory not accessible - Added by gstrauss over 8 years ago

dude, I dont know if you're taking pleasure into this but I am not going to enter your sicks and twisted game

@phil12345: nitrox took the time to patiently explain (multiple times) how lighttpd (and many other web servers) work. Your rude response is out of line. You have not demonstrated an understanding of what he tried to explain, and if you were still confused, you have not yet asked detailed questions directly related to nitrox's explanations. A conversation is not occurring here.

I am more used to apache, so I dont know why I need to enable dir listing to access subdirectories

You don't need to do that. Blindly following advice from other web pages has caused you additional confusion.

The links you provided appear to me to be similar amateur misunderstandings of how most web servers work, namely that a request for a resource results in a response from the web server, depending on what that resource is and how the web server is configured. In the simplest case, a request for a file results in the web server returning the file in the response. A request for a path ending in '/' often refers to a directory, and web servers can be configured to try multiple things to generate a response, including (but not limited to) looking for index.html or generating a directory listing. However, depending on the web server, these might be disabled by default and need to be configured for the web server to respond to requests ending in '/'.

@phil12345, please realize that you are conversing with people who know what they are doing, and have previously configured working web servers, and so it should be obvious to you that you have not sufficiently explained the problem you are having. Additionally, you must not be aware that lighttpd continuous integration runs test programs on Debian, and these tests pass, so there must be something that you are doing incorrectly. This is not a common problem -- despite what you think your search engine is telling you -- for anyone who has set up a web server before.

There. Now that I have provided some context as to why your flailing is being dismissed, perhaps you can try to troubleshoot your setup a little bit further instead of claiming to be a victim and demanding that someone else fix your problems. I suggest removing dir-listing.activate = "enable" as we have told you multiple times that this is not related to your problem. Then, try troubleshooting your original problem, perhaps by looking in the lighttpd error log.

    (1-8/8)