Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Query on CGI space and alias
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Query on CGI space and alias
Query on CGI space and alias
29-08-2011 11:43 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
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 (test.pl) in the cgi-bin folder. All permissions are set correctly.
I have my static web page in my htdocs directory.
I want to include test.pl 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 test.pl file to the htdocs folder (and set appropriate permissions).
If I use the full path name ie
<!--#include virtual="http://ccgi.username.force9.co.uk/cgi-bin/test2.pl"-->
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/test2.pl"-->
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 ?
There is one last thing to be resolved. I have my script (test.pl) in the cgi-bin folder. All permissions are set correctly.
I have my static web page in my htdocs directory.
I want to include test.pl 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 test.pl file to the htdocs folder (and set appropriate permissions).
If I use the full path name ie
<!--#include virtual="http://ccgi.username.force9.co.uk/cgi-bin/test2.pl"-->
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/test2.pl"-->
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 ?
Message 1 of 2
(1,284 Views)
1 REPLY 1
Re: Query on CGI space and alias
30-08-2011 10:09 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
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/test.pl"--> should work, wherever you put test.shtml.
Gabe
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/test.pl"--> should work, wherever you put test.shtml.
Gabe
Message 2 of 2
(339 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Query on CGI space and alias