Closed peterfox closed 9 months ago
I think you need to set resolve_root_symlink
in your config (under php_server
). See https://frankenphp.dev/docs/config/
@francislavoie thank you. This got it working for me:
{
# Enable FrankenPHP
frankenphp
# Configure when the directive must be executed
order php_server before file_server
}
localhost {
# Serve files from the public directory
root * public/
# Enable compression (optional)
encode zstd gzip
# Execute PHP files in the current directory and serve assets
php_server {
# Required store /public/storage folder
resolve_root_symlink
}
}
Release: v1.0.0 (via Docker) MacOS 14.1.2 (23B2091)
When using a soft linked directory the files within the directory end up providing a 404.
For example in Laravel if you have a project and run
php artisan storage:link
this creates a soft link between thestorage/app/public
folder andpublic/storage
. If a file exists instorage/app/public
sayexample.png
and I then try to access the file athttps://localhost/storage/example.png
the server fails to return the file.This maybe caused by Docker. I've not succeeded in making the server work on the mac itself yet.