Solved

Forbidden Access CGI Apache

Posted on 2007-04-05
1
1,193 Views
Last Modified: 2008-02-01
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"

Why?
0
Comment
Question by:joemontalbo
1 Comment
 
LVL 15

Accepted Solution

by:
samri earned 500 total points
ID: 18863149
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"/.
http://httpd.apache.org/docs/2.0/howto/cgi.html

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
</Directory>

and, modify the Options line to look -  


<Directory />
    Options FollowSymLinks +ExecCGI
    AllowOverride None
</Directory>

 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

cheers,
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question