Does the "media" dir need to be inside the public htroot?

Sorry for the maybe stupid question… I played around in my composer based install where kirby and site, content etc directories live outside my public html directory )Kirby meets Composer | Kirby CMS).

now I tried and set the roots media also outside the public html (don’t ask, to me it appeared more logic to have the site, content, media, in the same hierarchy), but then, although the “normal” frontend seems to work fine, I cannot access the panel anymore, because ./media/. ran into 404.

I guess I could make a .htaccess rewrite symlink for that, if I really needed this setup, but since this is/was more of a test, I wonder. I think it makes totally sense that assets and media indeed should be inside the public html dir, but then why can one “move” it outside with the $kirby->roots setting in the index.php?

I’m sure that either I missed something very obvious, or that this simply is not a use case at all. :slight_smile: anyway thanks for any hints.

The media folder needs to be publicly accessible, so it cannot live outside the webroot (but you can change its location inside the webroot).

thanks for confirming :+1: