0

I am using Ubuntu to run a web server with Apache, PHP and MySQL.

How can I monitor who is loading files on my server and which files are opened in PHP?

I would really appreciate your answer because I could not find anything ?

Thank you !

0

Apache has an access log that can be used to show this. From this site:

Default apache access log file location:

RHEL / Red Hat / CentOS / Fedora Linux Apache access file location: /var/log/httpd/access_log

Debian / Ubuntu Linux Apache access log file location: /var/log/apache2/access.log

FreeBSD Apache access log file location: /var/log/httpd-access.log

The access log shows what pages visitors viewed, the success status of requests, how long the request took to respond and the IP address of the site visitor.

To actually read the file you can use cat <path to access log>

3
  • 1
    Thank you so much brother. This is very important! . Do you know if PHP uses any log for this reason?. Again thank you so much.
    – Thanasis
    Apr 1 '20 at 16:30
  • No problem, what do you mean by PHP using any log for this reason? Apr 1 '20 at 16:31
  • Yes. a log for files opened and completed by php.
    – Thanasis
    Apr 1 '20 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.