Installing nextcloud in a jail separating php-fpm and nginx

I am migrating from linux to freeBSD.
I have a nginx in a jail, and I’d like to install nextcloud in a separate jail, to isolate the php execution.
Do the nginx server need to access either the installation directory or the data directory for directly serving assets ?

Thank you.