Forbidden Access CGI Apache

I have this CGI application running on Apache 2.0.5 on XP professional. It stopped working. Error: "Forbidden
You don't have permission to access /myapp.exe on this server"

Who is Participating?
samriConnect With a Mentor Commented:
hi  joemontalbo,

looking at the URL path, you may try to run CGI outside of /cgi-bin (default) folder.  Based on the URL, the myapp.exe may be located in your default htdocs folder ("c:\Program Files\Apache Group\Apache2\htdocs").

If you need to make this myapp.exe to be executed as CGI program, you need to configure your Apache to run CGI outside of "ScriptAlias"ed folder.  Having this option in your DocumentRoot is not recommended (but still possible).

Please refer to Apache docs on CGI -- and look at the secton for "CGI outside of ScriptAlias directories"/.

You may need to look at your apache configuration file ("c:\Program Files\Apache Group\Apache2\conf\httpd.conf")

and look for this section.

DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"

# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
# First, we configure the "default" to be a very restrictive set of
# features.  
<Directory />
    Options FollowSymLinks
    AllowOverride None

and, modify the Options line to look -  

<Directory />
    Options FollowSymLinks +ExecCGI
    AllowOverride None

 AddHandler cgi-script .cgi .pl

alternately, you could just copy the myapp.exe to "c:\Program Files\Apache Group\Apache2\cgi-bin" folder

and test it there, using the URL http://yourser/cgi-bin/myapp.exe

This is more recommended

All Courses

From novice to tech pro — start learning today.