nginx - php-fpm cannot start after changing default port
PHP中文网
PHP中文网 2017-05-16 17:16:28
0
3
1203

Recently built an nginx server that supports PHP on Centos 7. nginx, PHP and php-fpm were all installed using yum and used normally.
But because other programs need to occupy port 9000, the configuration in /etc/php-fpm.d/www.conf is changed:

listen = 127.0.0.1:32328

After modification, php-fpm cannot be started, and the error message is as follows:

Permission denied error occurred
The strangest thing is that after changing it back to 9000, it can start smoothly again!
Tried to modify the listen owner, listen group and listen mode in /etc/php-fpm.d/www.conf

listen.owner = nginx listen.group = nginx listen.mode = 0666

I also turned off the Centos 7 firewall, but still got the same error
Could you please tell me what the problem is, thank you!

PHP中文网
PHP中文网

认证高级PHP讲师

reply all (3)
大家讲道理

CentOS7’s selinux seems to have restrictions on port binding above 1024, so you should check Selinux first. If there is any, you can turn it off first.
getenforce to see if SELinux is turned on. If so, turn off selinux and start it again
http://www.jb51.net/LINUXjishu/192576.html

    左手右手慢动作

    By the way, I would like to ask how to elegantly pin outdated questions to the top

      淡淡烟草味

      I suspect that your port is occupied. . . .

        Latest Downloads
        More>
        Web Effects
        Website Source Code
        Website Materials
        Front End Template
        About us Disclaimer Sitemap
        php.cn:Public welfare online PHP training,Help PHP learners grow quickly!