How to configure Apache so all requests go to single CGI file
- by fastmonkeywheels
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.