This error is caused by Apache and its because the script, in this case index.php, does not have the correct user and group ownership. Thus, Apache cannot access the file.
This can be helpful if you have a lot of include files and want to deny direct access to those files.
You will need to do 3 easy steps in order to create an Apache virtual host in Ubuntu: create VirtualHost file or add a VirtualHost record in the default VirtualHost file, enable the site and restart Apache.
When the user types your domain with www, for example www.htmlviewer.net, it will be redirected to htmlviewer.net. Even if he access a page, it will be redirected to the same page without the www.