Miriam Posted October 5, 2005 Posted October 5, 2005 Is it possible to create the cgi-bin outside of public_html? If so, is there then a special way to access it in an html document? The normal way would be http://www.somesite.com/cgi-bin/program.pl If it's above the public_html, what would the the html code be? Thanks. Quote
abinidi Posted October 5, 2005 Posted October 5, 2005 I may be wrong, but the whole point of putting it above the public_html folder is so that you can't access it wtih HTML. The only way to access folders is to do something server side, and you can't do that in HTML. You'd have to do somethin in PHP. Maybe somebody with more PHP could address whether or not it is possible in PHP, but I'm almost certain you can't do it with regular HTML. I mean, that is kind of the point of moving it above the public_html folder. Quote
TweezerMan Posted October 6, 2005 Posted October 6, 2005 The purpose of creating a cgi-bin directory outside of /public_html is so executable .cgi scripts are segregated from the ordinary web pages on your web site. When this is done on a web server, there will be a ScriptAlias directive in the server's configuration file so the cgi-bin directory can be accessed from a URL. You can create a cgi-bin directory outside of your /public_html directory, but you won't have access to the server configuration file to add the necessary ScriptAlias directive (and this is something the Help Desk most likely would not perform for you either), so the short answer is, no, this is not something that you can do. Having the cgi-bin directory separate from your /public_html directory would only be useful if .cgi scripts can only be executed from your cgi-bin directory. TCH servers are configured so that .cgi scripts can be run from any directory within /public_html. You can restrict the ability of .cgi scripts to be run from directories other than the cgi-bin directory with .htaccess directives, but most people like the convenience of being able to run .cgi scripts from any directory in their web site. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.