Apache

Today I noticed the following lines in the Apache error_log file:

[notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring!

Of course, we do not like to waste the error_log file so I tried to find a solution to the problem.

In the present case, the problem was caused by the ErrorDocument file that was provided in the document_root directory for the domain name, as follows:

ErrorDocument 401 http://domain.tld/errorpage.html

This row had to be modified as follows:

ErrorDocument 401 /errorpage.html

If you have multiple web pages served by the Apache webserver it may be useful to look at all the .htaccess files in the document_root directory for domain names.

find -name '.htaccess' -exec grep ErrorDocument {} \; -print

 

Try the following command:

REDIRECT_STATUS=200 REQUEST_METHOD=GET SCRIPT_FILENAME=/home/richardbuz.de/index.php SCRIPT_NAME=/index.php PATH_INFO=/ SERVER_NAME=richardbuz.de SERVER_PROTOCOL=HTTP/1.1 REQUEST_URI=/ HTTP_HOST=richardbuz.de strace -s1024 /bin/php-cgi

Please replace these varaible for your own:

  • SCRIPT_FILENAME=
  • SCRIPT_NAME=
  • SERVER_NAME=
  • HTTP_HOST=

Open the /etc/httpd/bin/apachectl file, and find the ulimit value, put the wanted value, then save the file.

Next type the following commands:

killall -9 httpd
httpd restart

Note: https://serverfault.com/questions/162817/cpanel-ulimit-n-keeps-resetting...