Re-create Apache .conf for virtualhosts based on current Virtualmin settings?

Hi,

Is there a way to re-create the Apache .conf files from scratch based on current settings?

I’m not sure how it happened but my Apache virtual hosts conf files were modified by Virtualmin and now when I run a configuration check, it reports that various tags related to CGI/FCGI are missing. E.g.:

apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 94 of /etc/apache2/sites-enabled/the-website.com.conf: Expected </VirtualHost> but saw </Directory>
Action 'configtest' failed.
The Apache error log may have more information.

Now I’m worried I may not be able to restart apache without errors. I have many virtualhosts on this server, so I don’t want to encounter a critical error.

Hi,

You could try to toggle (disable/enable) website as a feature on Edit Virtual Server page but I think it will not help.

The simplest solution would be is to fix /etc/apache2/apache2.conf file manually.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.