Ubuntu 14.04
Trying to set up a virtual host. Have followed the advice in a number of tutorials and keep getting the same error.
I set up a folder on my desktop, as per tutorial instructions, called phpcourse
Put a file inside it called index.php with "Hello World" as the text.
Added the following line to /etc/hosts file:
- Code: Select all
127.0.0.1 phpcourse.dev
Uncommented the following line in /opt/lampp/etc/httpd.conf
- Code: Select all
Include etc/extra/httpd-vhosts.conf
Added the following code to /opt/lampp/etc/extra/httpd-vhosts.conf
- Code: Select all
<VirtualHost *:80>
DocumentRoot "/home/username/Desktop/phpcourse"
ServerName phpcourse.dev
<Directory "/home/username/Desktop/phpcourse">
Require all granted
</Directory>
</VirtualHost>
After making these changes, I type phpcourse.dev into my address bar and get the following error. Incidentally this also happens when I type localhost into my address bar. So not only does it not work but it also prevents xampp from working at all until I undo the changes again.
- Code: Select all
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403
phpcourse.dev
Apache/2.4.12 (Unix) OpenSSL/1.0.1m PHP/5.6.8 mod_perl/2.0.8-dev Perl/v5.16.3