Answer the question
In order to leave comments, you need to log in
How to install a different version of php in a subfolder?
Good day everyone!
There is a server on CentOS Linux release 7.2.1511 (Core)
Installed nginx 1.10.2 as a proxy and apache + mod_php 5.6. The site site.ru is spinning on the simple machines engine. I want to put yii2 with php 7.1 with php-fpm in the site.ru/folder/ subfolder. Is it possible? There is no way to remove Apache at all (there are a lot of complex htaccess). It is also not possible to transfer the entire server to php 7. The site does not support the old engine there.
Please tell me the correct sequence of actions so that php 7 works in site.ru/folder/ and other sites do not break.
Answer the question
In order to leave comments, you need to log in
There are many ways: AddHandler application/x-httpd-php71 .php, mod_fcgid, mod_proxy, allocate a virtual machine for another site, OS-virtualization like docker.
But there is another way, and in my opinion it is the best.
I would install nginx, and transfer the old apache to another port, and in nginx for the domain of the old site I would set up proxy_pass for php and direct return for statics.
This is a common practice, moreover, it will increase its performance.
Like AddHandler option in .htaccess :
Source: stackoverflow.com/questions/12561203/how-to-change...
I tend to raise the second virtual only php-fpm (even without nginx) and proxy requests there from the /folder/ location from the first server.
Are there pitfalls here?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question