$ sudo apt-get install apache2
The /var/www directory is owned by the root by default after installed. It's suggested to change the owner to another group/user, such as www-data. Such that you can easy to modify it, even via ssh remotely.
To change it owned by www-data user and group, enter the command.
$ sudo chown -R www-data:www-data /var/www
To grant permission to www-data group to read/write/execute the directory /var/www.
$ sudo chmod -R 775 /var/www
Add user pi to the group www-data
$ sudo usermod -a -G www-data pi
Log-out/log-in to let the change take effect.
Then you can edit //var/www/index.html by Pi.
No comments:
Post a Comment