Disable CGI and FCGI

I don’t need CGI and FCGI but Virtualmin installs a cgi-bin folder for every site I create.
What is the right way to disable CGI and FCGI for all my sites?
May disabling them cause some kind of trouble?
Thanks for your help.


Even if the PHP Execution Mode is set to mod_php, Apache is still configured to be able to use cgi-bin for other non-PHP apps.

I don’t actually believe that there’s a way to prevent that.

If you really want to make that dir go away, what I believe you’d need to do is manually edit the Apache config for that domain, remove the section that references the cgi-bin directory, and then once you do that you should be able to remove the cgi-bin dir.

Note though that I’d make backups prior to doing all that, just in case :slight_smile: