lodev's webserver image
1.6K
A production-ready web server container for PHP applications, built on top of lodev-php, featuring Nginx, Apache2, and PHP-FPM with comprehensive web server configuration tools.
The lodev-webserver image extends lodev-php with web server capabilities (Nginx and Apache2) and is a critical component of the lodev local development environment. It provides a complete PHP web application stack ready for development workflows with support for Magento, WordPress, Laravel, Symfony, Drupal, and other PHP frameworks.
Key characteristics:
| Variable | Default | Description |
|---|---|---|
NGINX_SITE_TEMPLATE | /etc/nginx/nginx-site.conf | Nginx site configuration template path |
APACHE_SITE_TEMPLATE | /etc/apache2/apache-site.conf | Apache site configuration template path |
TERMINUS_CACHE_DIR | /mnt/lodev_default/data/terminus/cache | Terminus (Pantheon) cache directory |
CAROOT | /mnt/lodev_default/data/mkcert | Certificate root directory for mkcert |
| All environment variables from lodev-php | See lodev-php README | Inherited PHP environment variables |
The container is configured with CAP_NET_BIND_SERVICE capability for both Nginx and Apache2, allowing non-root users to bind to privileged ports (< 1024).
linux/amd64 - x86-64 architecturelinux/arm64 - ARM64 architecture (Apple Silicon, etc.)The lodev-webserver image is automatically used by the lodev CLI for all PHP-based projects. Create and start a project:
lodev create --type php
lodev start
The lodev framework manages web server configuration, volume mounts, networking, and certificate generation.
For standalone use:
docker run -d \
--name web-app \
-v /path/to/project:/app \
-p 80:80 \
-p 443:443 \
-p 9000:8080 \
namnh198/lodev-webserver:latest
Nginx and Apache2 can be configured through:
$NGINX_SITE_TEMPLATE - Nginx site configuration$APACHE_SITE_TEMPLATE - Apache site configurationSwitch between web servers or enable both as needed in your Docker Compose configuration.
Generate local certificates with mkcert:
mkcert example.test
# Generates: example.test.pem and example.test-key.pem
Certificates are stored in $CAROOT (typically /mnt/lodev_default/data/mkcert).
Key directories:
/etc/nginx/sites-enabled/ - Enabled Nginx sites/var/log/nginx/ - Nginx logs/var/log/apache2/ - Apache2 logs/var/lib/apache2/module/enabled_by_admin/ - Admin-enabled Apache modules/var/lib/apache2/module/disabled_by_admin/ - Admin-disabled Apache modulesThis image and its source code are licensed under the Apache License 2.0. See LICENSE for details.
Contributions are welcome! Please submit issues and pull requests on the lodev GitHub repository.
Content type
Image
Digest
sha256:bb5d9a40f…
Size
562.4 MB
Last updated
29 days ago
docker pull namnh198/lodev-webserver