spujadas / lighttpd-docker

Docker image for lighttpd, a secure, fast, compliant, and flexible web server
MIT License
59 stars 66 forks source link

"/usr/bin/php-cgi" appears to be missing #26

Open bytebone opened 1 year ago

bytebone commented 1 year ago

I'm trying to get php working and am stuck at this problem. Let me write down some info on the setup:

i've considered downloading the php-cgi file from an AUR or whatever the official source is and linking it into /usr/bin directly, but that seems so sloppy and prone to issues that I didn't dare to try. Is this behaviour intended? Am I missing something obvious? I've searched the web far and wide and was not able to find anything helpful on this, since nothing is related to the docker image. I hope you can swiftly assist me here.

Thanks in advance.

spujadas commented 1 year ago

Only lighttpd and lighttpd-mod_auth are installed in the image. If you want to use PHP CGI, then first you’ll have to extend the image to install the corresponding package (look at the Dockerfile to see how this was done for lighttpd, and search for the package at https://pkgs.alpinelinux.org/packages). Then your *.conf files should work properly.

bytebone commented 1 year ago

I see. So a rebuilding of the image is necessary? Can this somehow be done on a live install? I'm not too familiar with the inner workings of docker images and how to construct a Dockerfile, especially since I want to set up and run the image with docker compose, not a Dockerfile.

spujadas commented 1 year ago

You’ll indeed need to build an image based on the current one. You could then publish this image somewhere (e.g. your host, Docker Hub) to make it available for your live install. Or based on the Dockerfile you’ve created to extend the image, you could also use docker compose to build and start the image directly from the Dockerfile.