Project

General

Profile

[Solved] Don't ignore path after file name but respond with 404

Added by stare.in.the.air about 6 years ago

Hello!

I have a very basic config:

server.port        = 3113
server.username        = "http" 
server.groupname    = "http" 
server.document-root    = "/srv/files" 
server.errorlog        = "/var/log/lighttpd/error.log" 
dir-listing.activate    = "enable" 
index-file.names    = ( "index.html" )
mimetype.assign        = (
                ".html" => "text/html",
                ".txt" => "text/plain",
                ".css" => "text/css",
                ".js" => "application/x-javascript",
                ".jpg" => "image/jpeg",
                ".jpeg" => "image/jpeg",
                ".gif" => "image/gif",
                ".png" => "image/png",
                "" => "application/octet-stream" 
            )

I'm running lighttpd 1.4.48 on an Odroid C2 (aarch64) on Arch Linux.

I have problems to formulate my problem, so I couldn't find the config I was looking for. But I can show it to you:

$ curl -I http://my-server:3113/video.mp4/.nomedia 
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Length: 5708056918

The rest of the output is shortened.

/srv/files/video.mp4 exists and is a valid file. It is served even if I append a nonsense path after the file name. I want lighttpd to respond with a 404 here. So I want some sort of strict file / url path matching.

I'm sure there is a config option for this, I just couldn't find it.

Thanks for your help!


    (1-2/2)