Right now on an Ubuntu 14.04 server, WordPress (and Apache2) creates folders with www-data:www-data owner:group. The goal is to have Apache create files with different owners depending on which site it's serving. wp_one:www-data within one WordPress instance, wp_two:www-data within a second WordPress instance.
Changing the APACHE_RUN_USER value within /etc/apache2/envvars would work if only one user was required. But each WordPress instance requires a different owner.
The logical place seems to be within the Virtual Host conf file for each site. But I can't quite pull it off.
What is the syntax for adding an owner that Apache will respect within the virtual host?
This doesn't work:
<Directory /var/www/wpone> export APACHE_RUN_USER=wp_one </Directory> nor this:
<Directory /var/www/wpone> User: name="wp_one" </Directory> I'd like to run many WP instances from a single server, each with different owners isolated from each other. My permission problems could be solved by adding the owners to the www-data group, but then each would have too much access to the other WP instances on the server.