I did a PHP 4.3.0 installation in CGI mode, on Apache 1.3.27, under Linux.
The DocumentRoot is "/home/www". Inside, there are 3 folders for 3 Virtual Hosts (v1, v2, vadmin).
v1 & v2 haven't got Perl scripts, only PHP scripts and HTML files.
vadmin must be reachable only from an internal network address (like 192.168.x.y). This VHost will have Perl scripts in /home/www/vadmin/cgi-bin/. PHP scripts (and some other stuff, like PhpMyAdmin) & HTML files will be in /home/www/vadmin/
Here is my actual httpd.conf :
DocumentRoot "/home/www"
# Do I need to have this ? because I use VHosts.
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
# Do I need to define AddType here ?
<IfModule mod_mime.c>
...
AddHandler cgi-script .php
AddType application/x-httpd-php .php
</IfModule>
NameVirtualHost *
<VirtualHost *>
DocRoot /home/www/v1
ServerName v1.myhost.com
</VirtualHost>
<VirtualHost *>
DocRoot /home/www/v2
ServerName v2.myhost.com
</VirtualHost>
<VirtualHost *>
DocRoot /home/www/vadmin
ServerName vadmin.myhost.com
ScriptAlias /cgi-bin/ /home/www/meditation/cgi-bin/
AddHandler cgi-script .pl
</VirtualHost>
I need help, because for the moment, only Perl scripts & HTML files work fine.For PHP scripts Apache returns error 403 (access denied). What is wrong 😕