We are using RHLE 5.6. I am fairly new with linux and apache. We currently have a website using an archaic exe file in the cgi-bin directory for a shopping cart (on Windows). We are migrating this website to the RHLE 5.6 server. The challenge I am running against is redirection for the files pointed at the commerce.exe file.

I have tried setting up a .htaccess ErrorDocument directive in our website folder, but the logs say that apache is not looking in the directory folder for the cgi-bin (/home/site/), but rather in /var/www. I have tried adding the .htaccess directives there and in the /var/www/cgi-bin folder, and it still presents me with the 404 error. I am open to creative suggestions - I just need commerce.exe to be parsed or redirected to a file that can be parsed.

Thank you!

JMax

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

...but the logs say that apache is not looking in the directory folder for the cgi-bin (/home/site/), but rather in /var/www

Create a ScriptAlias for it, something like this:

ScriptAlias /shopping "/home/site"

<Directory /home/site>
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>

I just need commerce.exe to be parsed

If mod_cgi can 'understand' it, just add an AddHandler:

AddHandler cgi-script .exe

A request for http://domain.com/shopping/commerce.exe would cause the server to run the /home/site/commerce.exe.

or redirected to a file that can be parsed.

RewriteEngine On
RewriteRule ^commerce\.exe$ anotherfile.cgi [L]
link|improve this answer
Thank you for your help! – JMax Oct 15 '11 at 0:21
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.