Run "sudo nano /etc/passwd" to edit the password file as root and add this line:
Code:
www-data:x:33:33:www-data:/var/www:/bin/sh
Now edit /etc/group by the same method and add:
Finally use these to recreate the /var/www directory:
Code:
sudo mkdir /var/www
sudo chown www-data:www-data /var/www
sudo chmod 755 /var/www
That should replace everything you removed. If it still isn't working, post the error, particularly any errors in /var/log/apache2/error.log, and we'll see what we can do.
I'm afraid any files you had in /var/www are gone. You'll have to rebuild the web site. For testing, let's just create a little index.html file like this:
Code:
sudo echo '<h3>Hooray!</h3>' > /var/www/index.html
Bookmarks