Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to change the Apache error log file via .htaccess?

I'm hosting a website in a shared host, but I'm getting the 500 error. Well, I don't have access to the Apache error log file to investigate the cause of the problem.

Is there a way to change the location of the Apache error log file via .htaccess to a dir that I can access it?

like image 506
fonini Avatar asked Dec 21 '12 16:12

fonini


People also ask

How do I find the Apache error log?

On a Linux server, you can access Apache error logs from var/log/apache2/error. log. You can then log out the errors from the error log file by writing the following command: sudo tail -f /var/log/apache2/error.

Where is .htaccess file Apache?

htaccess file can be found at /opt/bitnami/APPNAME/. htaccess. Some applications do not have the /opt/bitnami/apache2/conf/vhosts/htaccess/APPNAME-htaccess.

Where are the Apache log files located by default?

By default, you can find the Apache access log file at the following path: /var/log/apache/access. log. /var/log/apache2/access.

What is the name of the default error log in Apache?

Apache uses the Common Log Format (CLF) by default, but you can specify your own format string to change the fields included in each log. You can also use the CustomLog directive to change the location of the log file.


1 Answers

No.

According to the Apache documentation the context for the ErrorLog directive is server config, virtual host. It would list .htaccess if it were possible.

You may have a better chance at redirecting output through the server-side technology. But the best thing to do would be to contact your host. Access to your error log should be allowed.

like image 52
Jason McCreary Avatar answered Sep 26 '22 01:09

Jason McCreary