Solved

Forbidden Access CGI Apache

Posted on 2007-04-05
1
1,188 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

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…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

867 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now