Re: Apache 2.4 stability & ErrorLogFormat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On November 29, 2012 16:52 , Alvise Nicoletti <lists@xxxxxxxxxxxxxxxxxxx> wrote:
so you confirm it's actually impossible to have website URL reference in actual php error logs with apache 2.2 ... ?

I would not say "impossible" -- for example, you could modify the Apache HTTP Server code.

But, as Ben suggested, the best way to do what you want would be to change your PHP web applications. For more information, see http://php.net/manual/en/book.errorfunc.php In particular, be sure to see the Examples page as well as the pages for error_log() and set_error_handler().

Another thing you can do with PHP is use Apache HTTP Server <Directory> or <Location> contexts in order to override the PHP error_log configuration item to be different for each web application:

<Directory /path/to/webapplication/one>|
   php_value error_log /home/path/public_html/domain/PHP_errors.log
</Directory>
|



Of course I'm talking of a php application that is installed in a directory where is configured a virtual server with more than 1 website against it. Actually I have some php errors with /the/path/to/the/phpfile but I don't know wich website caused them.

If you do not want to approach this from the PHP end, move each web application to a separate web virtual host within the same web server (see https://httpd.apache.org/docs/2.2/vhosts/ ) You can then have a different Apache HTTP Server error log file for each web application (see https://httpd.apache.org/docs/2.2/mod/core.html#errorlog )

Or you may find it easiest to upgrade to Apache HTTP Server 2.4.

--
  Mark Montague
  mark@xxxxxxxxxxx


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux