Вопрос

Is there multiple error logs within a apache? meaning is there a php log, an apache log etc? As through research I've seen error log paths extend into the document root with the file type of file or through many folder such as /var/tmp/my-errors.log

  • What is the difference between these error logs?
  • What does var and tmp mean? and was this created by the user or is it inside apache?
  • Is a file with a file type of file unserviceable by apache? as my server creates a error log for php within my document root with the file type of file, is this a standard thing?

I want to create a error log file but how do I create one and where to I put it to make it unreadable, unserviceable to a user?

do I create it in document root with the file extension of .log, or outside the document root as everything there is in fact unserviceable by apache?

I would like my log file to be within the document root, and to be unserviceable by apache, do I do this by creating a file with a file type of file and if so how do I do this?

Это было полезно?

Решение

What is the difference between these error logs?

Apache generally only has an access.log storing information about which files have been requested and a generall error.log storing all (or most) errors that occurred during fullfilling any requests.

You can control whether the latter contains php errors or not via the php.ini directive log_errors.

What does var and tmp mean? and was this created by the user or is it inside apache?

/var is the linux standard directory for shared user data.
/var/tmp is a non-standard directory, but the name tmp always hints disposable data.

Is a file with a file type of file unserviceable by apache? as my server creates a error log for php within my document root with the file type of file, is this a standard thing?

Having the logs within the servable area is definitely not standard and even imposes a security threat. Logfiles should be kept outside of the web reachable area.

And if Apache couldnt serve files, what else would it serve?

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top