Apache’s “403 Forbidden” error message only when the page is called from other machines

apache-2.2http-status-code-403

I've recently updated my Ubuntu's Apache to 2.4 by compiling it from source and as a side effect I'm facing a strange behavior.

The Apache is able to serve the files locally but not on other machines. For instance when I type my machine's local IP 192.168.0.81 within the same machine it opens up the page. But when I type it on some other machine (on the same network) it gives out "Forbidden 403" error response.

Here are the scenarios I've already tested:

  1. Shutting down Apache to make sure that 403 is produced by right
    Apache. The results were positive, once shut down no response would
    be generated at all.

  2. As said before, loading the page using the local network IP
    (192.168.0.81) to make sure the Apache is listening to it and not
    just 127.0.0.1. Results were positive, the page could be loaded on
    the same machine as Apache resides (but not other machines).

  3. Testing Apache's logs: negative. No entry was made in access_log nor
    error_log, what so ever. Or at least I couldn't find it!

  4. Personally I believe when Apache's serving a file for a local
    request it is doing it on behalf of some user but when the
    request comes from some other machine, the user is changed and he
    (whoever he is) does not have sufficient access which results in
    "Forbidden 403" error. So to test this I changed all files' modes to
    777 and yet no luck.

Any suggestions?

Best Answer

Since 2.2 configuration options, including access control part has been changed.

You need to check apache configuration for access and add Require all granted string where required.