Forum

Multiple php in 1 website

Mustafa Ramadhan
28 January 2016, 10:20
I can use multiple php in 1 website under nginx. Their configure something like:
server {
...
location ~ ^/tester/(.+\.php)$ {
...
fastcgi_pass unix:/opt/configs/php-fpm/sock/php-admin.sock;
...
}

location ~ \.php$ {
...
fastcgi_pass unix:/opt/configs/php-fpm/sock/php-admin.sock;
...
}
...
}


For apache, need other trick with using their .htaccess.

Is it possible in hiawatha?.
Hugo Leisink
28 January 2016, 11:06
You can use the UrlToolkit for that.
FastCGIserver {
FastCGIid = PHP5
ConnectTo = /var/lib/hiawatha/php-fcgi.sock
Extension = php
}

FastCGIserver {
FastCGIid = PHP5-alternative
ConnectTo = /var/lib/hiawatha/php-fcgi-alternative.sock
Extension = php
}

VirtualHost {
...
UseFastCGI = PHP5
}

UrlToolkit {
ToolkitID = my_toolkit
Match ^/tester/ UseFastCGI PHP5-alternative
}
This topic has been closed.