I'm trying to configure a new virtual host with apache 2.4.16 Premise: I already have other virtual hosts and they work fine, so what I've done is simply duplicate the vhost and change paths and names.
The scenario is this one. I created a new vhost that contains this:
<VirtualHost *:80>
DocumentRoot "/Users/me/Sites/mynewsite/web"
ServerName mynewsite.lo
<Directory "/Users/me/Sites/mynewsite/web">
Require all granted
Options FollowSymLinks
</Directory>
ErrorLog /var/log/apache2/mynewsite.localhost-error.log
CustomLog /var/log/apache2/mynewsite.localhost-access.log combine
At this point I tried to load the page mynewsite.lo/robots.txt
ant I get this error
Forbidden
You don't have permission to access /robots.txt on this server.
Now, I tried to solve the issue looking at the access_log, error_log but nothing was written there. So by ls -latr
command I discovered that another logfile was changed, the myoldsite.localhost-error.log
Looking in that file I found
[Wed Oct 21 16:16:32.979200 2015] [authz_core:error] [pid 283] [client 127.0.0.1:56427] AH01630: client denied by server configuration: /Users/me/Sites/myoldsite
[Wed Oct 21 16:16:33.206456 2015] [authz_core:error] [pid 283] [client 127.0.0.1:56427] AH01630: client denied by server configuration: /Users/me/Sites/myoldsite, referer: http://mynewsite.lo/robots.txt
[Wed Oct 21 16:16:33.277496 2015] [authz_core:error] [pid 283] [client 127.0.0.1:56427] AH01630: client denied by server configuration: /Users/me/Sites/myoldsite, referer: http://mynewsite.lo/robots.txt
Now I don't know what's happening. The logs are written to the wrong file and when I try to reach mynewsite.lo I get the forbidden error message.
What am I doing wrong?