Skip to content

Can't listen on socket #1564

Description

@HA3MAK

I'd like to use the php-fpm container with socket listener(more secure I think) instead of tcp. I run my instance like this:


docker run -d \
	-e TZ=${MY_TIMEZONE} \
	--name php-fpm-8.4 \
	--network ${DOCKER_NETWORK} \
	--restart=unless-stopped \
	-v ${DOCKER_CONTAINER_DIR}/htdocs:/srv/www \
	-v ${DOCKER_CONTAINER_DIR}/php/run:/run/php \
	-v ${DOCKER_CONTAINER_DIR}/php/my-fpm-pool.conf:/usr/local/etc/php-fpm.d/www.conf \
	php:8.4-fpm

So, I override the www.conf with my customized FPM pool config which contains a "listen = /run/php/php.sock". When the container started there was no socket. After several minutes I found the mistake in file /usr/local/etc/php-fpm.d/zz-docker.conf. It redefines the "www" pool listen setting to tcp. Contents of the file:

[global]
daemonize = no

[www]
listen = 9000

Why this file exists? Why is it needed to contain "listen = 9000"?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions