Nginx PHP Docker container which provides the Nginx webserver bundled with PHP and common modules.
5.5K
Container Source - GitHub Mirror
This is the Conarx Containers Nginx PHP image, it provides the Nginx webserver bundled with PHP and most of the common PHP modules, it is commonly used to host various PHP apps.
The following PHP modules are included:
| Provider | Repository |
|---|---|
| DockerHub | allworldit/nginx-php |
| Conarx | registry.conarx.tech/containers/nginx-php |
All our Docker images are part of our Conarx Containers product line. Images are generally based on Alpine Linux and track the
Alpine Linux major and minor version in the format of vXX.YY.
Images built from source track both the Alpine Linux major and minor versions in addition to the main software component being
built in the format of vXX.YY-AA.BB, where AA.BB is the main software component version.
Our images are built using our Flexible Docker Containers framework which includes the below features...
Please use the project Issue Tracker.
Commercial support for all our Docker images is available from Conarx.
We also provide consulting services to create and maintain Docker images to meet your exact needs.
Additional environment variables are available from...
Maximum amount of memory usable by PHP, must be greater than PHP_MAX_UPLOAD_SIZE. Defaults to 128M.
Maximum client upload size. Defaults to 64M.
PHP timezone. Defaults to UTC.
Maximum number of php-fpm children. Defaults to 5.
Number of php-fpm servers to start. Defaults to 2.
Document root.
Postfix port 25 is exposed by the Conarx Containers Postfix image layer.
Nginx port 80 is exposed by the Conarx Containers Nginx image layer.
In addition to the configuration files included in the Conarx Containers Nginx image, the following additional files are of interest...
| Path | Description |
|---|---|
| /etc/php/conf.d/20-fdc-defaults.ini | Default PHP INI configuration |
| /etc/php/conf.d/20-fdc-timezone.ini | Generated from the value in PHP_TIMEZONE |
| /etc/php/php-fpm.d/www.conf | Configuration for php-fpm |
An example of the default vhost configuration for PHP can be found below...
server {
listen [::]:80 ipv6only=off;
server_name localhost;
root /var/www/html;
index index.php;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~* \.(js|css|gif|ico|jpg|jpeg|png)$ {
expires max;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ [^/]\.php(/|$) {
# Mitigation against vulnerabilities in php-fpm, just incase
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
# Make sure document exists
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
# Mitigate https://httpoxy.org/ vulnerabilities
fastcgi_param HTTP_PROXY "";
# Pass request to php-fpm
fastcgi_pass unix:/run/php-fpm.sock;
fastcgi_index index.php;
# Include fastcgi_params settings
include fastcgi_params;
# php-fpm requires the SCRIPT_FILENAME to be set
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REDIRECT_STATUS 200;
}
}
Health checks are done by the underlying Conarx Containers Nginx image.
Content type
Image
Digest
sha256:b273931d6…
Size
77.9 MB
Last updated
3 days ago
docker pull allworldit/nginx-php