Hi have a really annoying problem with the SSI command 'exec cgi=...' on my sub-domain. I want to include the output of a cgi script in a shtml file. But it doesn't work on my sub-domain although it seems to work on the principal domain. What could be wrong?
shtml file:
<html>
<head>
<title>Untitled</title>
</head>
<body>
<center>
<!--#echo var="DATE_LOCAL" --><br><br>
<!--#exec cgi="/cgi-bin/adlinks/adlinks.cgi" -->
</center>
</body>
</html>
I have contacted several times my server administrator and he says all SSI is enabled, but could it be that the exec tag isn't supported on sub-domains, or has it to be set explicity on?
All help is welcome, I don't know it anymore. Many thanks to all those friendly people helping me.
(edited by: sugarkane at 5:14 pm (gmt) on Oct. 23, 2001
<aside>
I've edited your post a little to make it more generalised - we try to stay away from posting specific urls as it can encourage promotional posts. Thanks for understanding.
</aside>
Okay, a few questions that will help in solving your problem: what server software are you running? Apache, Microsoft? How did you set up your subdomains?
<!--#include virtual="/cgi-bin/adlinks/adlinks.cgi"-->
the script will still execute.
If you are sharing a server, usually the "exec" function is disabled, by default, due to security issues. It may have specifically been enabled for your main domain but your virtual domain probably has enherited the default settings.
If this does not work, can you run the script directly in your browser? Do other cgi scripts work? You may not have 'ExecCGI' option turned on or 'AddHandler cgi-script .cgi' may not be defined for this virtualhost.
When trying the include virtual command it displays an error: '404 object not found'. And with the exec command, nothing is inserted in the shtml page although the script really works. I just don't understand it.
Maybe someone of you could tell me what configuration the windows2k server needs to have to run SSI exec also on sub-domains. On my main domain this works, but not on my sub-domains. Is there something what has to be turned on?
Please tell me step by step what I could do about this. Many thanks.
So, the main (host) domain's cgi-bin was called (plain ole) cgi-bin, but a sub domain's cgi-bin had an alias like subdomainname-cgi. When including a script call for a sub domain the actual html was written as:
<!--#include virtual="/subdomainname-cgi/adlinks/adlinks.cgi" -->
On WINDOWS, though, I am unfamiliar with configuring aliases, if it is necessary, or even possible. This was just how I got around the problem with hosting sub domains, each with their own cgi-bin, and making it work for me Q&D (quick-and-dirty).
Can the Windows server gurus shed some light here?