Log files not removed when virtual server (a domain) is deleted from VM

I noticed the log files remain after an account is deleted in VM.

-rw-rw---- 1                                573 apache     534319 Jan 27 17:54 domain.com_access_log
-rw-rw---- 1                                573 apache      61457 Jan 26 00:07 domain.com_error_log

-- Craig

Status: 
Closed (fixed)

Comments

Which directory are these log files in?

Also, if you create a test domain and then delete it, are the logs still left behind?

Which directory are these log files in?

/var/log/virtualmin

Also, if you create a test domain and then delete it, are the logs still left behind?

No but I don't think these logs are created until there is web trraffic.

Logs will get created empty as soon as the domain is created. So if there is some bug that is causing them to be left behind when the domain is removed, they should still appear if you create and then delete a test domain.

Jamie,

I verified the logs are NOT being removed, here are the steps I followed.

  • Created a new test site in the VM web panel = testserver.com
  • Checked to see if *_access and *_error logs existed - they did not
  • Placed a simple html test page in ../testserver.com/public_html
  • Created HOSTS entry so I could view the page
  • Verified the logs were created, they were
  • Deleted the test site using VM web panel
  • Logs still exist, see below
-rw-rw---- 1                                573 apache       1632 Feb  3 17:51 testserver.com_access_log
-rw-rw---- 1                                573 apache        388 Feb  3 17:50 testserver.com_error_log

I just tested these same steps, and the logs were again properly deleted..

During the deletion process, do you see the message "Deleting Apache log files" ?

Ok, I see why this happens now - for some reason, you had a very old and obsolete option set that controls the way Apache virtual hosts are deleted. This option isn't even in the UI anymore, so I had to disable it manually by editing /etc/webmin/virtual-server/config and removing the delete_indom=1 line.

With that done, the problem was solved..

Ok, I see why this happens now - for some reason, you had a very old and obsolete option set that controls the way Apache virtual hosts are deleted. This option isn't even in the UI anymore, so I had to disable it manually by editing /etc/webmin/virtual-server/config and removing the delete_indom=1 line.

With that done, the problem was solved..

Automatically closed -- issue fixed for 2 weeks with no activity.