Ability to set PHP version per directory inside the same webspace
A customer would like to be able to assign different PHP versions for different directories inside one the the same webspace.
/var/www/vhosts/example.com/httpdocs - php5.3.3
/var/www/vhosts/example.com/httpdocs/test - php5.2.17
/var/www/vhosts/example.com/httpdocs/test2 - php5.6.12
Thank you for your input. We will consider this functionality in upcoming releases, if it will be popular.
Everyone, please continue voting for this feature if you consider it important.
Я хочу иметь такую функцию
Gabriel T commented
@Sergey sorry for the long delay to respond. I was caught up in work and didn't have time to catch up here. What I mentioned for SEO is just a simple use-case based on statistics reports I gathered online. To be honest I don't understand how you suggest to configure virtual directories in this case to bypass this SEO issue. It would very interesting to see an implementation example to overcome this situation.
I also understand this would be a long-term commitment to implement this because it does seem really hard to do. But I do think it would also be a great asset for PLESK and worth investing the time and effort.
Thank you @Gab T for explaining the usage. It really helps to understand the reason behind a request to evaluate its priority
We will consider this, but cannot promise quick delivery. PHP version is tightly connected to website concept.
However, did you consider placing scripts in different site and configuring virtual directories in .htaccess for SEO needs? Can that help?
Gab T commented
This is a must have feature. A very common usage of this is when we have a corporate website and we want to host an eshop in a subdirectory for SEO purposes instead of a subdomain.
If we have different platforms for website and eshop it could impose restrictions. For example main website is old and needs php5.3 and shop will require php 7.
In CPanel it's possible already by using an .htaccess rule like
AddHandler application/x-httpd-php56 .php5 .php4 .php .php3 .php2 .phtml
which is really versatile but it would be best if a GUI was available too. Sites using such setups are impossible to host in Plesk at the moment.
This would be great!