How to configure Apache so all requests go to single CGI file

Posted by fastmonkeywheels on Server Fault See other posts from Server Fault or by fastmonkeywheels
Published on 2010-03-11T17:18:26Z Indexed on 2010/03/11 17:20 UTC
Read the original article Hit count: 748

Filed under:
|
|
|

I'm porting a CGI application from an embedded web server to run under Apache. In the effort of changing the least amount required I'm trying to figure out how to configure Apache so any requests coming in go to my CGI program, which then will use the QueryString environmental variable to determine which file needs to be created.

I have Apache working now to where it will process my CGI file if it's requested directly i.e. localhost/cgi-bin/cgi_test.out

but I need to figure out how to get my application to be called whenever any file is requested:

localhost/ -> call my application with QueryString set to "" or "/"

localhost/thisFile -> call my application with QueryString set to "/thisFile"

etc.

I have been doing all of my configuration testing under /etc/apache2/sites-available/mysite, which has been enabled and the default disabled.

Thanks for any help.

I've tried the recommendation from here: http://serverfault.com/questions/56082/configure-apache-to-handle-all-requests-via-single-index-php but I keep getting circular redirects.

© Server Fault or respective owner

Related posts about apache

Related posts about apache2