issue PHP (cgi) with apache and suexec (mod_dir issue)

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
nono34
Forum Newbie
Posts: 2
Joined: Mon May 05, 2003 12:45 pm

issue PHP (cgi) with apache and suexec (mod_dir issue)

Post by nono34 »

Hi all.

I ve a big problem.
i ve compiled PHP with CGI modulte, Apache too (with suexec)

ALL is working nice (each virtual host run on is own ID, Cgi script work nice)

BUT

when i tryng : http://www.domain.com/
it doesn't work !

but http://www.domain.com/index.php is working !

I ve search for many days ! and i find nothing :(

i think the problem is when apache use mod_dir

There is a sample of my config :
#############################################
# HOME ARCHITECTURE
#############################################
/home/USER1/site_1/
/home/USER1/site_2/
/home/USER1/site_3/

/home/USER2/site_1/
/home/USER2/site_2/
/home/USER2/site_3/

....

I m hosting a thousands of website.

#############################################
# SUEXEC CONFIG
#############################################

/usr/local/apache3/bin/suexec -V
-D DOC_ROOT="/home"
-D GID_MID=99
-D HTTPD_USER="www"
-D LOG_EXEC="/usr/local/apache3/logs/suexec_log"
-D SAFE_PATH="/usr/local/apache3/bin:/usr/local/bin:/usr/bin:/bin"
-D SUEXEC_UMASK=072
-D UID_MID=99
-D USERDIR_SUFFIX="site_1/"

#############################################
# APACHE CONFIG
#############################################
Port 80

User www
Group www

<Directory />
Options FollowSymlinks ExecCGI
Order Deny,Allow
Allow from All
AllowOverride AuthConfig
AddHandler cgi-script .cgi .pl
</Directory>

<IfModule mod_userdir.c>
UserDir site_1
</IfModule>

<IfModule mod_dir.c>
DirectoryIndex index.htm index.html index.php index.php3 index.php4
</IfModule>

<VirtualHost http://www.hebergementx-gratuit.com>
User hebergem
Group users
DocumentRoot /home/hebergem/www/
CustomLog /home/log/httpd3/hebergem_log 'combined'
</VirtualHost>
#############################################

#############################################
# UID AND GID
#############################################
Apache : User and Group : www ---> 500
#############################################


PLEEEEASSSEE HELP !!!!

Thx !
Bruno
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

as far as I can see there's an index.html in the directory that is served if no document is specified in the request, perfectly according to your DirectoryIndex settings. But maybe I missed the point ;)
nono34
Forum Newbie
Posts: 2
Joined: Mon May 05, 2003 12:45 pm

i ve found

Post by nono34 »

hi,

i ve solved my issue, PHP 4.3.1 RC 1 was the trouble !!
i ve compiled the lastest beta version, php 4.5

and now ALL is working nice !

(same configuration)

Thx anyway
Bruno
Post Reply