Web Hosting Talk







View Full Version : CGI-BIN location


kickster
01-08-2001, 09:22 PM
How Can I place a CGI-BIN directory below the WEB directory?

This way it will be protected.

Starhost
01-09-2001, 12:29 PM
But I don't think you'll be able to access it over the web. What you can do is this:

Create a cgi-bin dir in the web directory.
Make a .htaccess file
Put in the .htaccess file the following line:
----------------------------------------------


Options -Indexes



----------------------------------------------

Upload this .htaccess file to your cgi-bin. Now people won't be able to see the content of a dir, though they can access a file directly (if they know the write url).

AP
01-09-2001, 12:53 PM
If you are using Apache use the ScriptAlias directive in the config file. Your CGI-BIN directory can be anywhere then. For example your paths would look like /home/usersname/www/ for web files and /home/usersname/cgi-bin/ for cgi files. I think that is what you are looing for.

AP

Starhost
01-09-2001, 01:06 PM
What is percisely the benefit of your solution?!?

Is it safer?

-Edward-
01-09-2001, 01:32 PM
yeah the folder doesnt show only the file can be accessed i just tryed it.

Starhost
01-09-2001, 01:36 PM
Though I don't get why it is safer,

-Edward-
01-09-2001, 01:51 PM
Helps hide files that you dont want to be found.

eva2000
01-09-2001, 02:34 PM
wouldn't putting a blank index.html file in the /cgi-bin/ directory do the same thing ?

Starhost
01-09-2001, 02:46 PM
No because when you then access /cgi-bin/other_dir you will see the content, with the .htaccess solution you also don't see any content in that dir.

eva2000
01-09-2001, 02:58 PM
Originally posted by Starhost
No because when you then access /cgi-bin/other_dir you will see the content, with the .htaccess solution you also don't see any content in that dir. i see.. learnt something new again :D

AP
01-10-2001, 12:32 AM
I'm not sure that using ScriptAlias is any more secure or less secure than using the .htaccess file but it does seperate the cgi-bin directory from the document root. Also I find it easier to setup and manage since ScriptAlias does it in one line where as you would need to define the ExecCGI directive and setup the .htaccess file to do the same thing.

AP

ML2008
06-11-2001, 10:43 PM
Is there an easy way to create via ftp a cgi-pub folder for all the domains to use?

Chicken
06-11-2001, 10:49 PM
Not by ftp, no.

ML2008
06-11-2001, 10:54 PM
Thank you