The default document root for Apache 2 is "/var/www/", if you input "http://localhost/" in your Web browser's URL address, you will get the contents of "index.html" in "/var/www/" directory.
If you want to change this default directory, modify the file "/etc/apache2/sites-available/default" (sudo gedit /etc/apache2/sites-available/default), and then, use the following two commands:
sudo apache2ctl -t
And then
sud apache2ctl restart
ps: sometimes you need to restart your apache server, here is the commands:
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 restart
Aucun commentaire:
Enregistrer un commentaire