How to remove error_logs file?

  • Posted April 21, 2014

Hi, I have a setup of centos / apache with virtualmin. I just noticed today that error_logs files are being created in public_html folder and is publicly accessible. How can I prevent this file from being created in public_html, can I shift the location of this file? OR any other solutions? Please help. Thanks for your help in advance.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Thanks @ Andrew SB.

@hypertextsol: That line is what determines where the log file is stored. So, just change the line and make sure that the directory actually exists. And restart apache.

Thanks Colin for the help. <br>The CHMOD is working fine. <br> <br>Can you please help me in how to change the path <br>ErrorLog /var/log/virtualmin/domainname.com_error_log <br> <br>can I do this <br>ErrorLog /var/log/virtualmin/ <br>is this correct way to do. <br> <br> <br> <br>Thanks for further help.

You can change the error log by changing the path on this line <br> <br>ErrorLog /var/log/virtualmin/domainname.com_error_log <br> <br>Or you can use the CHMOD command to change the permissions so that it is not publicly accessible.

Anyone who can help me?

Please discard the previous one <br> <br> is the new link. <br> <br> <br>Thanks for the help <br> <br>here is the link for virtualhost and .htaccess file

Can you pastebin your .htaccess file (if any) and your virtualhost’s config?