Showing results for 
Search instead for 
Did you mean: 

Query on CGI space and alias

Posts: 3
Registered: ‎29-08-2011

Query on CGI space and alias

I've just spent 2 evenings trying to get Perls Scripts in my cgi-bin to load and run correctly.  Successfully - but what a minefield.  Maybe I'll write a help page - I had to hunt all over the place for what I wanted.
There is one last thing to be resolved.  I have my script ( in the cgi-bin folder.  All permissions are set correctly.
I have my static web page in my htdocs directory.
I want to include into the html.  This I have done using a <!--#include virtual .....  -->  command
I have set the appropriate .htdocs permissions for shtml files (although in the end, it wasnot needed).
And everything works - but only if I move the html file to the cgi-lib folder.
Or if I move the file to the htdocs folder (and set appropriate permissions).
If I use the full path name ie
<!--#include virtual=""-->
I get an error.  I read somewhere that Apache doesn't accept full paths for server side includes.
If I make sure that both files are in the same directory, then the following will work:
<!--#include virtual="/cgi-lib/"-->
But I do not want my perl and my html in the same folder !.  What I need is an alias to my cgi-lib space.  Years back, force9 set it up like this, but I cannot find any reference to an alias.  Does anyone know if there is one ?
Posts: 767
Registered: ‎29-10-2008

Re: Query on CGI space and alias

Hi silsden,
On ccgi, your home folder is just / and scripts can go wherever you like under it. With include virtual, the path can be either relative to, but below, the working folder (for security) or the full path from your home folder, so something like <!--#include virtual="/cgi-bin/"--> should work, wherever you put test.shtml.