I am working on creating a web application where multiple users would run off of one PHP codebase. The way this would work, in my head, is that I would have my primary codebase set up as a user on the system, and the files would be in the public_html (/home/codebase/domains/codebase.com/public_html/).
The next step would be for each client I sign up I would create a new user account and symlink to the codebase for each file and directory needed.
Example: A symlink set up as /home/client/domains/client.com/public_html/phpfile.php to /home/codebase/domains/codebase.com/public_html/phpfile.php.
This way each client would not be able to access configuration files for different users.
So I need to know a couple things to make this work:
Thank you in advance as I am having a lot of issues figuring out how to make this work and this so is the best option I can come up with.
The next step would be for each client I sign up I would create a new user account and symlink to the codebase for each file and directory needed.
Example: A symlink set up as /home/client/domains/client.com/public_html/phpfile.php to /home/codebase/domains/codebase.com/public_html/phpfile.php.
This way each client would not be able to access configuration files for different users.
So I need to know a couple things to make this work:
- Would creating a symlink to another account be possible? I think there would need to be some setting changed so that php would have access to the other user (codebase) account.
- If point one is possible, then would there be a way to programmatically create the symlinks. Either through php or by using php to call a server script that accepts variables to create the symlinks?
Thank you in advance as I am having a lot of issues figuring out how to make this work and this so is the best option I can come up with.