Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGIbin. Don’t really understand where it is

Status
Not open for further replies.

ghassanghellal

Programmer
Jun 23, 2003
18
GB
My website is not hosted on my own server, I use the ftp to upload stuff to it. I am told to upload the formail.pl file to the cgi bin. I don’t see a cgi bin anywhere. Do I just create a folder in the server and call it cgi bin?
 
Usually your host will have it created for you. Because I have a dedicated server, I had to create my own, but that is neither here nor there. :p Let's say your home directory comes out to be this have you type pwd and press enter at the shell (if you have access):
/home/ghass/

That's the standard location. One of my old shared hosts had my cgi-bin likes this:
/home/ghass/cgi-bin/ and they mapped it to be read by the outside world. Another host I had did it like this:
/home/ghass/And on my ded. server it is done like this: (because other domains are hosted on the server, a friend is letting me use his server)
/home/ghass/domain.ext/cgi-bin

I am Comptia A+ Certified
 
cgi-bin is a sub-directory dedicated for thinngs like perl scripts. You can't run your web pages from there but you can run scripts that create web pages from your cgi-bin directory.

If you're unsure about where it is, or even if you have one, contact your web host. They'll be able to point you in the right direction.

There's always a better way...
 
I just want to note I was pointing out some common locations of the cgi-bin directory. :)

I am Comptia A+ Certified
 
Frequently servers that are hosted on the win32 platform dont have a cgi-bin because the entire web directory is CGI enabled, not one directory;

A little background, the cgi-bin convention was set up so that sysAdmin's knew where potentially maliciaous scripts were located on their servers. This is a Unix convention I might add. The windows platforms dont use this capability because files are executed base on permissions and file extensions. Therefore, if you have file.cgi or file.pl win32 will execute it based on the file extension. Therefore, u can put the script in the main directory and it will usually run just fine as long as you have access to it. And the server is CGI enabled.

What is your server type?


haunter@battlestrata.com
 
Haunter,

That's not true.

I don't know about other servers but Apache on Windows does not execute cgi scripts outside of a ScriptAlias directory unless it is configured to do so.

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Wullie I was refering to windows IIS not apache. It is more common to find a win32 system with IIS running than a win32 system with apache running.




haunter@battlestrata.com
 
thanks guys for the help, i called my ISP and they made a cgibin for me. so now its ok
thank
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top