I have a server running Ubuntu 16.04 with Nginx and php 7.0
Server is running and Nginx is serving pages fine for existing virtual servers.
I needed to have php 5.6 running as well, so I installed it as php-fpm and manually changed the location of the socket for one virtual server that needed php 5.6.
Now, when I create new servers I get a Bad Gateway 502 error:
2016/10/18 00:23:06 [crit] 2818#2818: 5 connect() to unix:/var/php-nginx/14767429362197.sock/socket failed (2: No such file or directory) while connecting to upstream, client: ...*, server: , request: “GET /phpinfo.php HTTP/1.1”, upstream: “fastcgi://unix:/var/php-nginx/14767429362197.sock/socket:”, host: "*****"
The folder 14767429362197.sock exists, but without content (no socket).
What did I mess up ?
Any help is much appreciated.
Removed php5.6-fpm and installed it again using: apt-get install php5.6 php5.6-cgi php5.6-fpm
Now, I disabled Nginx website for the virtual server and enabled it again.
This has partly solved the issue - now my old PHP 7 virtual servers are running and also new servers I create are running.
So I have PHP 7 and PHP 5.6 running together witch is fine.
Problem now is new servers is created with PHP 5.6, not PHP 7.
Wondering how I can change that?