Per the Draft RFC `security.txt` is meant to be akin to `robots.txt`, in that it's at the root of the path.
So yeah, it's a bit inconsistent.
So yeah, it's a bit inconsistent.
https://www.ietf.org/rfc/rfc5785.txt
It should not be too hard to make an exception for this path in your web server configuration. Also note that URLs do not have to match the local filesystem, so you could as well use an alias to a different local path.