How to log site traffic to access.log (Apache)?

Hi, I did a standard LAMP installation on Ubuntu 16.04 following guides found in linode.com/docs. Everything has been working fine as far as I know but I can't get traffic to my site logged in access.log. Not sure if it's a permission issue because error.log in the same directory is being written to by apache. Any ideas?

EDIT: Solved

1 Reply

I checked the Apache Man page and all users with access to Apache should have access to the logs.

I try and locate one of these folders:

/var/log/apache/access.log
/var/log/apache2/access.log
/var/log/httpd/access.log

You can create your own custom logs with the mod_log_config file following this guide. Using this file you can specify what is logged and where it goes.

According to Apache you should verify the who has access to the log files. If you are hacked the log files cannot be edited. Which is common practice to delete the IP address of the attacker.

This can be found along with other tips in the Apache Security Tips page

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct