Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

403 with CGI on Apache 2.0 (win2k server)

Status
Not open for further replies.

aquanerd

Technical User
Oct 8, 2002
10
US
My setup: Win2k Server, Apache 2.0.43, ActivePerl 5.6.1

I've got the proper AddHandler in the httpd.conf to allow .cgi files to be processed, and the cgi script shebang has been modified to point to the proper Perl directory.

For some reason, I'm getting a 403 when I try to access the .cgi file. Since I can't chmod the directory, what else is left? Should I add a .htaccess file to the directory?
 
Shebang is ignored in Win32, so modifying that is irrelevant.

Did you set your Apache httpd.conf to include the correct paths and syntax in these statements:

ScriptAlias /cgi-bin/ "C:/web/cgi-bin/"

<Directory &quot;C:/web/cgi-bin&quot;>
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory> Newposter
&quot;Good judgment comes from experience. Experience comes from bad judgment.&quot;
 
Shebang is ignored in Win32, so modifying that is irrelevant.
I'm trying to get GreyMatter blogging set up, and the install instuctions say that you have to change the shebang for windows. I guess since I've change it, it won't matter either way.

When I setup the scriptAlias directive, I get a error 500 when I load the CGI page. I'm assuming I don't have to call the directory &quot;cgi-bin&quot;. I've seen CGI running in directories named something else, so I figured that's not the issue, but maybe it is.

I'll give it another try. Thanks for the help.
 
always be sure to check you error_log for apache whenever you get an error, it may have the answer you need..

B
 
You don't have to call the directory cgi-bin (in fact, it's a good idea not to, to reduce hacking), you just have to be consistent in using the actual path everywhere.

I did change my shebang to Windows path before I was told it doesn't matter, so you can leave it as is.

Adding .htaccess will only complicate the matter and is unnecessary. There has to be something simple that's still being overlooked. Can you display your httpd.conf here (good idea to edit the domain and IP so as not to show actual - hackers abound here). Newposter
&quot;Good judgment comes from experience. Experience comes from bad judgment.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top