In the archive httpd.conf
search for the following entry:
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all # linha padrão, geralmente causa do problema
</Directory>
Switch the line in question to:
Allow from all
This will make apache accessible to all machines on your network (and out if your router is doing port fowarding). If you want to restrict only local access use:
Deny from all
Allow from 127.0.0.1
Another important point is the user permissions as per Bacco comments. In addition to the folder permissions it is good to check the user of Log On of service in:
services.msc -> Apache -> (Duplo Clique) -> Aba Log On
For default this must be a local system user. In this case it is recommended that the httd.conf
contain the settings:
User daemon
Group daemon
P.S. Of course that’s not the best setup in terms of security. It is recommended to create a non-administrator user dedicated to the server (e. g., apache
), grant this user privileges so that it can log in as a service and act as part of the operating system (in secpol.msc
) and ensure access permissions consciously only for the necessary folders.
Sources:
You have an index.html or index.htm in this folder?
– user6026
The folder exists and has an index.html file
– L. WD
Apache is running as a service or standalone?
– Bacco
How do I know the difference?
– L. WD
@Lucas press the windows key, type in services.Msc and enter. Then see if the list of services has Apache and if it is running. (If you need to click it to run it, or put a shortcut in the start folder, it is probably not as a service). You can use both ways, but the permissions change a little. It’s for test environment only?
– Bacco
I did what I said and saw Apache in the list with the status of "Started" and in Boot Type is "Automatic"
– L. WD
Okay, so you’re on service anyway. Probably just hit the folder permissions, right-click on it, in the security tab, and add the apache user. Pressing Control + Shift + Esc, in the Processes tab, pressing "show all users' processes" you see the Apache credentials.
– Bacco