Sub domain different php version

zbahadir

Verified User
Joined
Apr 17, 2006
Messages
20
Hi,
I have a problem. I tried a lot of suggestions but it didn't work.
I want to use php 7.2 on domain.com but I want to have sub domain php 5.6.

What methods should I try?

http server Apache
Directadmin version 1.57.5
optons.conf
php1_releas A = 7.3
In php1_mo = php-fpm
php2_releas A = 7.2
In php2_mo = php-fpm
php3_releas A = 7.1
In php3_mo = FastCGI
php4_releas A = 5.6
In php4_mo = php-fpm
I'll be happy if you can help me :)
 
Last edited:

ViAdCk

Verified User
Joined
Feb 14, 2005
Messages
271
You have to create an independent hosting account for that subdomain and assign the php version you prefer.
 

zbahadir

Verified User
Joined
Apr 17, 2006
Messages
20
I think I did. It's working.
I've added a custom httpd configuration file. I copied the existing Folder structure and changed the php version.

CUSTOM4
| * IF SUB = "phptest" |
<Directory /home/****/domains/****.com/private_html>
AllowOverride AuthConfig FileInfo Indexes Limit Options = Indexes, IncludesNOEXEC, MultiViews, SymLinksIfOwnerMatch, FollowSymLinks, None
Options -ExecCGI -Includes + IncludesNOEXEC
<FilesMatch "\. (Inc | php | phtml | phps | php56) $">
<If "-f% {REQUEST_FILENAME}">
#ProxyErrorOverride on
AddHandler "proxy: unix: /usr/local/php56/sockets/ ****.sock | fcgi: // localhost" .inc .php .phtml .php56
</ If>
</ FilesMatch>
</ Directory>
| * Endif |
Problem The PHP4_RELEASE variable was not available in Custom HTTP Configurations.


php_release.png
 
Last edited:
Top