2

I created a virtual host using Apache. The normal 127.0.0.1 or localhost works, it get a successful output. But on input the name of the virtual host, I get an error message.

Forbidden

You don't have permission to access / on this server.

Here are my settings:

hosts

127.0.0.1   example.com
127.0.0.1   www.example.com
255.255.255.255 broadcasthost
::1             localhost 

httpd.conf

[...]
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf
[...]

httpd-vhosts.conf

<VirtualHost *:80>
ServerName localhost
DocumentRoot "/Library/WebServer/Documents"
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/Library/Webserver/Documents/example/"
    ServerName example.com
    ServerAlias www.example.com
    ErrorLog "/Library/Webserver/Documents/enetworks/example.com-error_log"
    CustomLog "/Library/Webserver/Documents/enetworks/example.com-access_log" common
</VirtualHost>

example.com-error_log

127.0.0.1:50922] AH01630: client denied by server configuration: /Library/Webserver/Documents/example/

Could anyone say me, where's the problem? Thanks, ;).

0

You must log in to answer this question.