Why is there a cgi-bin folder?
You might find a cgi-bin folder inside the files/folders for your website (public_html). This folder is simply for users who want to run CGI scripts, if you’re not familiar with this, you can simply leave the folder there.
What is CGI?
CGI stands for Common Gateway Interface, it’s the mechanism that the web server uses to pass requests received by the server off to any script interpreter (e.g PHP, Perl, Python, Ruby, etc).
Here is where the CGI fits into the request process:
- The web browser sends a request off to the web server
- The web server received the request
- The web server sends the request off to the CGI program (e.g PHP, Perl, Python, Ruby, etc)
- The program passes the output back to the web server
- The web server passes the output back to the web browser
What happens if I delete the cgi-bin folder?
Nothing, you won’t break anything. However, the folder will be re-created automatically, so there isn’t much point removing it.