Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS How to Make a Website Sharing a Website Upload the Website

Danilio Moreno
Danilio Moreno
929 Points

In the www folder how do you know if you need cgi-bin folder or not? Do you always delete it?

In the video it says we do not need it so it is deleted, how do we know when we need to delete it or not?

1 Answer

Justin Black
Justin Black
24,266 Points

Back in the olden days ( think 15 years ago ), many developers heavily relied on the use of the cgi-bin folder. Now days, with the introduction of languages like Ruby and PHP, it is not necessary to even have it.

The folder is a historic relic, that reminds us that have been in the industry for over a decade of harder times. Back in those days, the cgi-bin was the only place where executable or script code (binaries, shell scripts, etc.) could be stored. All major web hosts these days however, do allow you to run scripts residing anywhere.

Now some web hosts, especially shared hosts, still create this directory by default. Many of them won't LET you delete them, and it's fine to leave there if you aren't using it. If it's a dedicated server, or you are the server admin, it's completely fine to delete it granted you aren't running centos with cpanel which utilizes easyapache.

Easy apache is a pain, and deleting the wrong thing can muck things up.