Forum Moderators: coopster & phranque

Message Too Old, No Replies

SSI exec cgi problem on sub-domain, please help?

I want to exec a cgi script trough SSI on a sub-domain, but it doesn't work

         

admoz

4:59 pm on Oct 23, 2001 (gmt 0)



Hi nice people out there,

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

sugarkane

5:19 pm on Oct 23, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi admoz, welcome to wmw :)

<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?

netcommr

1:48 am on Oct 24, 2001 (gmt 0)

10+ Year Member




Try this:

<!--#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.

admoz

11:45 am on Oct 24, 2001 (gmt 0)



My host runs on windows2k servers. I don't really know how they set up my sub-domains.

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.

idiotgirl

3:02 pm on Oct 24, 2001 (gmt 0)

10+ Year Member Top Contributors Of The Month



I know on *nix/apache with subdomains I had to configure my srm.conf and httpd.conf files to look for 'aliases' for sub domain paths and their associated cgi-bins.

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?

netcommr

3:02 am on Oct 25, 2001 (gmt 0)

10+ Year Member



I am sorry, I just took a guess you were on Apache. SSI in most commonly used in conjuction with Apache. I am not familiar enough with Win2K to help.

The 404 error may signify your path is wrong, you need an absolute path with 'includes', such as C:/wwwroot/homefolder/cgi-bin...