By default, localhost (127.0.0.1) points to /var/www/ directory in Ubuntu. I prefer the location to be in my home directory. To change the default location, open the file: /etc/apache2/sites-available/000-default.conf and change it to look as follows: (My wokspace is located at /home/chaithanya/www) <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /home/chaithanya/www <Directory /home/chaithanya/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> ...