deda-ca / cgi-node

CGI Node.js complete module to replace PHP on shared hosting such as GoDaddy
http://www.cgi-node.org/
MIT License
172 stars 21 forks source link

Getting Godaddy Windows Machine with Parallels Plesk to Work #15

Open maplion opened 8 years ago

maplion commented 8 years ago

Hi, do you think you could offer any insight into how to get a Windows web.config correct to get this working on a Windows machine? I am using the web.config below and it just redirects me to the cgi-node.js and shows that text in my browser. I am assuming I am missing something in order to get the cgi-node.js to "run" instead so I can see the results of <? CgiNodeInfo() ?>. Any help would be appreciated. Thank you.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="cgi-node">
                    <match url=".jscript" />
                    <action type="Rewrite" url="\cgi-bin\cgi-node.js" appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>
deda-ca commented 8 years ago

I would love to help. IIS (Internet Information Services) hosting and configuration is completely different than Apache. You'll need to tell IIS to execute *.jss scripts as CGI using node.exe. Since we are using an intermediate script, cgi-node.js, to execute the page it might be a bit tricky.

If IIS allows parameter passing to the CGI application this it will be easy, otherwise I might have to create an exe that wraps node.exe with cgi-node.js to then execute the web script file *.jss.

These are some clue on the direction to take with ISS. I'll try it out and keep you posted.

maplion commented 8 years ago

Awesome, that would be great. Thanks a lot! I'll keep researching myself as well.

deda-ca commented 8 years ago

I setup IIS to execute cgi-node for *.jss files. It worked but I got the following error:

node.js:558 throw new Error('Implement me. Unknown stdin file type!'); Error: Implement me. Unknown stdin file type! at process.stdin (node.js:558:17) at startup (node.js:155:16) at node.js:814:3

I'll need to look into it further...

maplion commented 8 years ago

Okay.

I'm learning/playing with IIS web.config-urations (not making much progress, but understanding more). Is this being run as a classic/legacy CGI application or as a FastCGI application?