Solved

Forbidden Access CGI Apache

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
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…
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

10 Experts available now in Live!

Get 1:1 Help Now