Jump to content

Moving Cgi-bin Above Public_html


Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...