Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Freeware & Shareware (https://www.askmehelpdesk.com/forumdisplay.php?f=390)
-   -   Can I delete Apache log error? (https://www.askmehelpdesk.com/showthread.php?t=378740)

  • Jul 22, 2009, 06:15 PM
    Mister XYZ
    Can I delete Apache log error?
    Hi.

    Im currently using Apache HTTP Server 2.0.63. I wonder if I can delete 1 file called error under the following address: C:\Program Files\Apache Group\Apache2\logs. This is due to the space it has taken up. It took up 9+ GB fyi. And I will appreciate if anyone will guide me how to delete it away. Since I try quite a few time deleting. But error message was: Cannot delete error : Access is denied.

    Help! Thanks
  • Jul 30, 2009, 09:00 AM
    megamanhood

    The Apache log file is locked when the server is running... so you are not able to delete it.

    Open the cmd prompt window and try this simple script:

    Net stop apache2
    Del "C:\Program Files\Apache Group\Apache2\logs"\error.log
    Net start apache2

    The first line stops the Apache web server.
    The second line deletes the log file.
    The 3rd line restarts the server.

    You may like to copy the above scripts to a batch file and post it to your desktop.

    Another way is to directly go the Window Services (Start->Run->services.msc) and stop the Apache web server services. Then open up explorer, located the log file and delete it. Restart the Apache service again.

    Hope it helps.

  • All times are GMT -7. The time now is 12:39 AM.