...
Note the PHP process runs under Apache as the www-data data which belongs to the www-data group. Giving the www-data group write access effectively grants the PHP process the required write access.
Keep in mind that you can not go into the /opt/web/php directory as a normal staff user. At the same time, if you use serveradmin you do not have access sudo.
Make your staff user part of the serveradmin and www-data group,
Code Block | ||
---|---|---|
| ||
sudo usermod -a -G serveradmin bhitch
sudo usermod -a -G www-data bhitch
exit # If you used your own staff account to modify your staff account, you need to exit and log back in. |
Finally logoff and log back in with your staff account for the group changes to take effect.
Configure PHP to Use Specified Folders
...
Code Block | ||
---|---|---|
| ||
sudo mkdir /opt/web/php/dailyplanet.com sudo chown -R serveradmin:www-data /opt/web/php/dailyplanet.com/ sudo chmod -R u+rwX,g+r-w+X,o-rwX /opt/web/php/dailyplanet.com/ |
Note | |||||
---|---|---|---|---|---|
Keep in mind that you can not go into the /opt/web/php directory as a normal staff user. At the same time, if you use serveradmin you do not have access sudo. One workaround is to also make your staff user part of the serveradmin and www-data group,
|
Setup Apache Virtual Host
Setup your Apache Virtual Hosts with the website root.
...