recreate apache config

I’m wondering how I can delete all entries for a virtual server in the httpd.conf file, and then have virtualmin recreate it.

Well here’s one way. Make a backup of your desired virtual server. Then restore that virtual server and select “Yes” to the question “Delete and recreate virtual servers”. This should also include deleting what was in httpd.conf for that particular virtual server and then recreate it using what is default in your virtualmin template for httpd.conf virtual servers.

As a second option you could just create a new virtual server and then compare/diff the VirtualHost sections… I’ve done this several times before.