Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

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]
share|improve this answer
    
Thank you for your help! –  SwiftOtter Studios Oct 15 '11 at 0:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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