[Apache 2.2] PHP4 en 5 per virtual server

Pagina: 1
Acties:

  • Jurgle
  • Registratie: Februari 2003
  • Laatst online: 20-01 10:16

Jurgle

100% Compatible

Topicstarter
Waerden,

Ik heb op een WinXP bak een werkende config met apache2.2 en php4 OF php5. Nu is de bedoeling dat ik zonder proxy of CGI trucjes beide versies onder apache draaiend krijg per virtual server. Dus op php4.domein.nl draait php4 en op php5.domein.nl draait php5. Dit krijg ik echter niet voor elkaar. Weet iemand raad? En ja, natuurlijk heb ik gegoogled, ge-php.net-ed en ge-got-searched.

Een gedeelte van de httpd.conf (wat niet werkt):
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<VirtualHost *:80>
    ServerName php5.domein.nl
    DocumentRoot D:/webdirs/domein.nl/php5

    #PHP 5 Integration
    LoadModule php5_module "c:/php5/php5apache2_2.dll"
    LoadFile C:/php5/php5ts.dll
    
    <Files "*.php">
        AddHandler application/x-httpd-php .php
    </Files>
</VirtualHost>
<VirtualHost *:80>
    ServerName php4.domein.nl
    DocumentRoot D:/webdirs/domein.nl/php4

    #PHP 4 Integration
    LoadModule php4_module "c:/php4/sapi/php4apache2.dll"
    LoadFile C:/php4/php4ts.dll
    
    <Files "*.php">
        AddHandler application/x-httpd-php .php
    </Files>
</VirtualHost>
<VirtualHost *:80>
    ServerName www.domein.nl
    ServerAlias domein.nl *.domein.nl
    DocumentRoot D:/webdirs/domein.nl/www
</VirtualHost>


Wat dus wel werkt is PHP4 OF PHP5 als de loadmodule etc boven de <virtualhosts> staan en 4 of 5 gebruikt wordt. Als ze er allebei staan overruled de eerste die genoemd wordt.

My opinions may have changed but not the fact that I am right ― Ashleigh Brilliant


  • Jurgle
  • Registratie: Februari 2003
  • Laatst online: 20-01 10:16

Jurgle

100% Compatible

Topicstarter
Schop

My opinions may have changed but not the fact that I am right ― Ashleigh Brilliant