我应该删除我刚刚创建的子域中的 cgi-bin 文件夹吗?

在我的托管帐户上使用 cpanel,我创建了一个子域——例如 Www.clothing.mysite.com

在目录中为 clothing.mysite.com 自动创建了 cgi-bin 文件夹。我需要吗?我只是用子域安装 wordpress。我真的不知道 cgi-bin 文件夹是干什么用的,如果它不会伤害任何东西,我很乐意离开它。有什么想法吗?

79416 次浏览

cgi-bin historically was the only place where executable or script code (binaries, shell scripts, etc.) could be stored. It is mostly a historic relic since most hosts allow execution of scripts from anywhere.

You can safely delete it. "cgi-bin" is hardly ever used these days.

You can safely delete "cgi-bin" folder, it's hardly ever used nowadays

Also beware that when your server got some malware scripts scans different folders and then hides on folders like cgi-bin because they rarely are checked now.

I even wrote a script before that "monitors" different folders in my server and alerts me if it found different scripts in there on my personal and clients servers too.

I haven't seen it mentioned but it might also be worth noting that since cgi-bin is traditionally used to execute scripts, some hosting providers might require you to edit your .htaccess file if you wish to execute scripts outside cgi-bin (same is true if you deleted your cgi-bin).