Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: How to invoke CGI program without using its file extension? |
|
Author |
|
raguila
Joined: 04 Oct 2006 Posts: 3
|
|
Back to top |
|
Brian
Joined: 21 Oct 2005 Posts: 209 Location: Puyallup, WA USA
|
Posted: Thu 05 Oct '06 1:34 Post subject: |
|
|
You could implement this with MOD_REWRITE, or perhaps you could use a PHP (or any server-side scripting language) script to do this whereby you call it something like:
http://www.mywebsite.com/scripts/run.php?prog=blablabla
In your script you could do something as basic as have some pre-defined titles and if the request matches one of the titles in your list your script kicks out the appropriate headers to tell the browser what to expect and then it sends the file.
This way it can handle the security and access to the programs/scripts/executibles on your server. This creates a very secure environment since you can control more easily who, what, and when the scripts can be accessed.
You could make this dynamic as well via a db driven list of apps, or keep it simple as I mentioned.
Personally, I would look at using PHP or perhaps mod_rewrite or even setting up a proxy to connect to this file.
I hope that some of these ideas get you started. If you desire more specific info, try doing a little research on what I suggested as well as what others may suggest for solutions. Then, if all else fails post a follow up. |
|
Back to top |
|
raguila
Joined: 04 Oct 2006 Posts: 3
|
Posted: Thu 05 Oct '06 13:59 Post subject: |
|
|
It works without .exe extension in Apache 1.3 then I think it is a configuration issue that it do not in Apache2. But, what have I to change? |
|
Back to top |
|
CanUuRead
Joined: 18 Sep 2006 Posts: 38
|
Posted: Thu 05 Oct '06 18:35 Post subject: |
|
|
What did you do in Apache 1.3 to accomplish this? |
|
Back to top |
|
raguila
Joined: 04 Oct 2006 Posts: 3
|
Posted: Fri 06 Oct '06 12:50 Post subject: |
|
|
Ok, I get it!
In Apache2 config file I need to add in the cgi-bin Directory section the following directives:
Options MultiViews
AddHandler cgi-script exe
With these directives I can run a cgi program (.exe) without using its file extension.
I were not using this options in Apache 1.3, perhaps the default behaviour are diferent in both releases.
Thanks. |
|
Back to top |
|
|
|
|
|
|