Forum Moderators: coopster & phranque

Message Too Old, No Replies

Suexec Apache2.0 Getting 403 Forbidden for CGI SCRIPTS

         

Anyango

8:04 am on Jul 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey All

we have a couple of Unmanaged servers from ev1servers.
and we have configured many virtual hosts on them over the months and everything in PHP is running smoothly. now we needed to install some CGI scripts for some of our virtual hosts and that has become a pain in the heart for me atleast.

each time i enable any virtual host directory to execute CGI , it starts giving 403 forbidden and when i disable it to execute CGI then ofcourse the perl cgi scripts arent executed and are given to me for download.

I did some research and found that SuExec is the main cause of this , as the server is fully ours therefore i set user and group directive of my virtual host to "root" and killed apache and started again, but no luck, still 403, then i changed user and group to "apache", still no luck.

Can someone Please assist me with his experience?

Problem in Simple Words:

we have a server with following Virtual hosts set up on that

vhost1.com
vhost2.com
vhost3.com

i want to create a directory named "cgi-bin" for "vhost1.com" so it should be accessible like [vhost1.com...]

and then i want apache to execute all cgi perl scripts in that directory.

without getting a 403 forbidden.

Please be known that i am not a newbie, i have wast programming experience and simple newbie answers wont help, i have tried everything i knew. need some strong solution

i am using webmin as server management interface
Apache 2.0
with perl and php installed

Thank You For your TIme
I look forward to hearing from you all.

Matt Probert

3:09 pm on Jul 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



May sound stupid, and apologies if you have already done this (but we all miss the obvious ometimes), but have you checked the Apache htconfig file for the executable CGI directories?

Also, are the access rights correct for the CGI-BIN sub-directories?

Matt

Anyango

7:47 pm on Jul 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Matt!

Thanks For your message.

although i checked it before but i again checked it after your message.

Apache's Default configuration is set to execute CGI script in a directory which is common for the server and is accessibly by all virtual hosts setup on that.
Becase our sites have different variety of content therefore we donot want our this cgi script to be accessible from more then one of our virtual hosts.

Yes Permissions are also set correct. Even when i disable suExec even then it doesnt let me execute scripts from that Sub-Directory for my virtual host.

Kamran

wruppert

8:16 pm on Jul 9, 2005 (gmt 0)

10+ Year Member



You may want to try the Apache forum, this is not really a Perl question. They may have more ideas over there.