----- Original Message ----- From: "F. Bos" <f.bos32@xxxxxxxxx>
To: <users@xxxxxxxxxxxxxxxx> Sent: Wednesday, August 31, 2005 10:48 AM Subject: RE: [users@httpd] CGI executing for a certain directory
Thanks for the explanation but I still can't get it right :( (also read themanual again). If this is of importance: I'm using Windows XP in combination with Apache 1.3.33 I request like this: http://localhost/test/cgi-bin/omega.exe omega.exe is the cgi executable that I want to call and it is in this dir: C:\Apache\htdocs\test\cgi-bin I've got the alias set: ScriptAlias /cgi-bin/ "C:/apache/htdocs/test/cgi-bin/" Now I request http://localhost/test/cgi-bin/omega.exe but I still get the code of the executable viewed :(When I read the manual I get the impression that I need to put omega.exe inthis dir: C:\Apache\cgi-bin And then use this alias: ScriptAlias /cgi-bin/ "C:/apache/cgi-bin/"
This is most correct. cgi-bin really shouldn't be some subdirectory of htdocs.
And then call: http://localhost/test/cgi-bin/omega.exe
Call it with: http://localhost/cgi-bin/omega.exe
but when I do this I get a message that the requested page can't be found. So what is the solution for this, can someone help me out?? I hope I don't annoy you guys with these basis questions but I'm awfully confused and just can't make it work. Thanks, Floris -----Oorspronkelijk bericht----- Van: Boyle Owen [mailto:Owen.Boyle@xxxxxxx] Verzonden: woensdag 31 augustus 2005 11:05 Aan: users@xxxxxxxxxxxxxxxx Onderwerp: RE: [users@httpd] CGI executing for a certain directory-----Original Message----- From: F. Bos [mailto:f.bos32@xxxxxxxxx] Sent: Mittwoch, 31. August 2005 10:50 To: users@xxxxxxxxxxxxxxxx Subject: [users@httpd] CGI executing for a certain directory .. when I request a cgi executable that's in the directory "C:/apache/htdocs/test/cgi-bin/" the webserver attempts to view the file instead of executing it.How do you request it? If you access it as a file, you're just using your browser as a directory-browser and so bypassing apache. To get apache to fetch the file you need to use HTTP so you should request: http://your-server/cgi-bin/program-nameWhen I configure cgi execution for a certain directory this has nothing to do with my scriptalias or does it?Oh yes it does! The ScriptAlias tells apache that the directory contains executables and so it will *only* execute files found there and *never* display them. So you absolutely need: ScriptAlias /cgi-bin/ C:/apache/htdocs/test/cgi-bin/ If you just have one program in a directory which also has static content, you can define it as executable using the ExecCGI/AddHandler method but that's not what you've got, I think. Read over the tutorial again to get the difference: http://httpd.apache.org/docs/2.0/howto/cgi.html Rgds, Owen Boyle Disclaimer: Any disclaimer attached to this message may be ignored.Thanks in advance!! <Directory "C:/apache/htdocs/test/cgi-bin/"> AllowOverride None Options +ExecCGI Order allow,deny Allow from all </Directory> --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxxThis message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system.Please also immediately destroy any hardcopies of the message. You must not,directly or indirectly, use, disclose, distribute, print, or copy any partof this message if you are not the intended recipient. The sender's companyreserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
--------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx