Yes, but you would need to run a separate PHP interpreter for *each* independent service with different access rights.
I.e. for each user using php.
Same for Java. And each needs its own not-too-tiny share of memory, etc.
Also the fastcgi apache modules are not considered DFSG-free.
I already mentioned FastCGI in my posting, btw.
Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds