How to change the port of php5-fpm?

Hi folks!

I want to run Portainer, but it needs the port 9000

Port 9000 is being used by php5, which is configured in /etc/php5/fpm/pool.d/www.conf

Just changing the port to another (unused) one and restarting ee stack reload --php broke PHP5 websites

What else do I have to change to get php5-fpm away from port 9000?

EDIT:

I found out that editing the settings in /etc/nginx/conf.d/upstream.conf to the new port solved it. I did a simple ee stack reload --php and ee stack reload --nginx and it works now

Still waiting for a confirm if I should take care of something else :slight_smile: I now use the port 9002, as it hasn’t been used via netstat -tulpn

You also have to edit the port of the php upstream or nginx will still use the previous one. File to edit is /etc/nginx/conf.d/upstream.conf

Then just restart php5. 6-fpm and reload nginx

1 Like

Ah so my edit has been faster than your reply :>

Anything else I should take care of?

No, it’s okay. In fact if you do not use php5. 6-fpm, you can even stop and disable the service, and set 9070 as php upstream port in upstream.conf to use php7 everywhere

1 Like

I’ll look into that, because I don’t think I have a service running that relies on PHP5 :slight_smile: