NGINX + PHP-FPM

NGINX + PHP-FPM is a Docker image that runs an Nginx web server with PHP-FPM and can pull or push application code from Git repositories.

  • Development
  • Network Services
  • Other
  • Productivity
  • Tools & Utilities
  • Web & Publishing
NGINX + PHP-FPM is a Docker image that runs an Nginx web server with PHP-FPM and can pull or push application code from Git repositories. It is suited to lightweight PHP deployments that need configurable templates and local volume user ID mapping.

Platform availability

Available on 2 of 10 platforms

  • Unraid
  • TrueNAS (not listed)
  • Umbrel (not listed)
  • ZimaOS (not listed)
  • Proxmox (not listed)
  • Helm
  • Mac (not listed)
  • Windows (not listed)
  • Linux (not listed)
  • Any server (not listed)

Health score?A 0-100 score computed nightly from four factors: maintained (40%: recent commits and steady activity), popular (25%: GitHub stars, log scale), easy to install (20%: platforms, install notes, setup guides, Docker image) and light to run (15%: minimum RAM, ARM support). When the source code has been checked, a fifth factor, security check (20%: automated scan for committed secrets, unsafe desktop-app settings, known-vulnerable dependencies and project hygiene; any serious finding caps it at 20), is added. Factors without data are left out and the rest are rescaled.

36/100 Low

Maintained
0last commit 1259 days ago
Popular
651,683 GitHub stars
Easy to install
452 install platforms, install notes, Docker image
Light to run
No data
Security check
63no serious findings, CI, OpenSSF Scorecard 2.9/10

Based on 4 of 5 factors.

Availability: platform listings confirmed today, links checked 54 days ago

GitHub stars
1,683
Open issues
19
Last commit
2023-06-10
Latest release
3.1.6
License
GPL-3.0
Activity
stale

Checked 21 days ago - source: GitHub (richarvey/nginx-php-fpm)

Resources & Compatibility

ARM (e.g. Raspberry Pi) is supported.

Checked 54 days ago - source: Docker Hub image tags and published docs

First-install notes

  • Map host port to container port 80 Use a port mapping like -p 8080:80 in your docker run command so your computer can reach the web server. Without it, the container listens on port 80 only inside Docker and your browser cannot connect. source
  • Set template variables before starting If your config uses a template, mount your templates folder to /etc/nginx/templates and set variables such as MY_DOMAIN with -e. This lets Docker replace placeholders like ${MY_DOMAIN} before starting, otherwise the server name may stay wrong and requests for your domain can fail. source
  • Autotune workers to available CPUs If you limit the container's CPUs, set NGINX_ENTRYPOINT_WORKER_PROCESSES_AUTOTUNE=true so nginx starts with workers (background handlers for traffic) matching the allowed CPUs. This prevents nginx from trying to use more CPU than Docker permits, which can slow the site or waste memory. source

Fetched 54 days ago - each note links to its source

Alternatives (11)

  • Apache HTTP Server - Open-source HTTP server offering cross-platform support, modular architecture, secure configuration, robust content delivery, and extensive…
  • BunkerWeb - BunkerWeb is a self-hosted, open-source web application firewall and NGINX-based web server that protects services with secure-by-default s…
  • Caddy - Caddy is an extensible web server and reverse proxy that serves Transport Layer Security (TLS) by default, making it simple to secure and r…
  • Corvus - Self-hosted reverse proxy and web application firewall with a web console; it provides domain forwarding, free SSL, live traffic monitoring…
  • Haproxy - HAProxy is a TCP proxy and a HTTP reverse proxy.
  • Microsoft IIS - Internet Information Services (IIS) for Windows® Server is a flexible, secure and easy-to-manage Web server for hosting anything on the Web.
  • Træfik Proxy - The Cloud Native Application Proxy Simplify networking complexity while designing, deploying, and operating applications.
  • Varnish - Varnish is an open-source HyperText Transfer Protocol (HTTP) accelerator for website operators that serves cached pages from memory in fron…
  • lighttpd - Lighttpd is a secure, lightweight web server that uses memory and CPU more efficiently than comparable servers, with FastCGI, CGI, authenti…
  • nginx - Nginx is an HTTP web server, reverse proxy, content cache, load balancer, TCP/UDP proxy, and mail proxy server.
  • nginx-ui

Checked 40 days ago - source: AlternativeTo

Common questions

How do I make the container pull application code from Git on first start?

Set the GIT_EMAIL, GIT_NAME, GIT_USERNAME, GIT_REPO, and GIT_PERSONAL_TOKEN environment variables in the docker run command. The image uses those values to pull the repository when the container is created.

How can I open the default install after starting the container?

Use docker inspect to get the container IP, which is often 172.17.0.2. Then browse to that IP over HTTP to view the default install files.

How do I align file ownership when mounting a local volume?

The image provides UID mapping for local volume support. Use that mapping so the container's file ownership matches your host volume needs.

How can I customize nginx or PHP behavior without replacing the whole configuration?

It supports custom nginx configs and core nginx/PHP variable overrides for running preferences. Use those overrides to adjust runtime settings as needed.

Does this image support Let's Encrypt SSL?

Yes, the image has support for Let's Encrypt SSL configurations.

Answers sourced from github.com

Community

Collected 53 days ago - public community threads