Laravel routes under /.well-known/ return 403

How to reproduce

  1. Create a Laravel app on an ApisCP.
  2. Add a route:
    Route::get('/.well-known/test', fn () => 'ok');
    
  3. Make sure no public/.well-known/ folder exists.
  4. Request it:
    curl -i https://example.com/.well-known/test
    

What’s happening

HTTP 403, with the body ok.

What’s expected

HTTP 200, with the body ok.

Notes

  • The global <Files ".*"> Require all denied in httpd.conf appears to treat .well-known as a dot file when the folder doesn’t exist on disk.
  • A path with no route (for example /.well-known/nothing) correctly returns 404.
  • OAuth clients such as Claude and ChatGPT must read /.well-known/oauth-authorization-server and /.well-known/oauth-protected-resource (RFC 8414 and RFC 9728), and stop on a 403.
  • Workaround: an empty public/.well-known/ folder.

Create the folder or open a bug report with Apache since <Files> is snarfing it up despite path delineation with /. That’s not something addressable but “good to know”.

Thanks, yeah I created the folder and it works as expected.