Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bytebone opened this issue Dec 2, 2022 · 3 comments
Open

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

bytebone opened this issue Dec 2, 2022 · 3 comments

Comments

@bytebone
Copy link

bytebone commented Dec 2, 2022

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

  • in lighttpd.conf i've enabled the modules alias, access and accesslog, and additionally am trying to include "mod_cgi.conf" and "mod_fastcgi.conf".
  • I'm running the latest docker release under sebp/lighttpd in a docker environment, and the webserver is behind an nginx reverse proxy
  • when uncommenting the "include fastcgi" line, the webserver will no longer start, since it's complaining about the php-cgi file missing: (gw_backend.c.1619) invalid "bin-path" => "/usr/bin/php-cgi" (check that file exists, is regular file, and is executable by lighttpd)
  • while the container is running (without including fastcgi in the config), docker exec lighttpd ls /usr/bin | grep php returns nothing. I've also checked the ungrepped list of things, and there is no php-cgi link/file.
  • my adjusted lighttpd.conf file is being linked into the container as a file link, instead of the whole config folder as is described in the docker compose section of the README. So the issue is not related to the "mod_fastcgi.conf" file provided by the image being overwritten by the config volume.

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
Copy link
Owner

spujadas commented Dec 3, 2022

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
Copy link
Author

bytebone commented Dec 3, 2022

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
Copy link
Owner

spujadas commented Dec 3, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants