403 Forbidden You do not have permission to access / on this server

0

I have the following VirutalHost Configured on my server

Listen 8080
<VirtualHost *:8080>
    ServerAdmin application
    DocumentRoot "C:\wamp\www\application\public"
    ServerName localhost application.com.br
    ErrorLog "logs/application.log"
    CustomLog "logs/application.log" common
</VirtualHost>

When I access my localhost or network application it works correctly but when I access via domain application.com.br the following error is displayed

403 Forbidden You don't have permission to access / on this server
    
asked by anonymous 05.09.2014 / 18:25

1 answer

2

The correct one would be:

<VirtualHost *:8080>
    DocumentRoot "C:\wamp\www\application\public"
    ServerName application.com.br
    ErrorLog "logs/application.log"
    CustomLog "logs/application.log" common
</VirtualHost>

You added a space in ServerName, you can not do this, in my test I always had an error when doing this kind of thing.

Another thing to do is edit your hosts files to assign the application.com.br address to your local IP, otherwise you will never access the test application.

read the read the following article to clarify any doubts about the topic.

    
05.09.2014 / 19:50