8ctopus / apache-php-fpm-alpine

A docker web server with Apache and php-fpm on top of Alpine Linux for php developers
MIT License
39 stars 11 forks source link

How to work with traefik? #3

Closed huthief closed 2 years ago

huthief commented 2 years ago

Is it possible work with traefik ? I tried many ways but it's work. ><

huthief commented 2 years ago

It works. ^^ But there is no user www-data:www-data exits. Is it possible to add?

8ctopus commented 2 years ago

Hello @huthief , sorry but I don't know what traefik is.

If I understand correctly, you need both user and group www-data. correct?

huthief commented 2 years ago

Yes. I tried add following to Dockerfile. It works. Maybe there is a better chose?

group www-data already existed

RUN set -x addgroup -g 82 -S www-data

RUN set -x adduser -u 82 -D -S -G www-data www-data

and change nobody:apach to www-data

change nobody:apach to www-data

RUN sed -i 's|;listen.owner = nobody|listen.owner = apache|g' /etc/php7/php-fpm.d/www.conf

RUN sed -i 's|;listen.owner = nobody|listen.owner = www-data|g' /etc/php7/php-fpm.d/www.conf RUN sed -i 's|;listen.owner = group|listen.group = www-data|g' /etc/php7/php-fpm.d/www.conf

BTW, traefik is another reverse-proxy choose. See https://doc.traefik.io/traefik/

8ctopus commented 2 years ago

Looks good to me! I'll add it in the next release or feel free to make a pull request.

8ctopus commented 2 years ago

@huthief release 1.2.3 adds your changes (I've slighty tweaked your code).

T H A N K Y O U