devcontainer/dockerfiles/httpd
2018-03-29 13:06:17 +00:00
..
2.4 Fix copy of vhost file from host 2018-03-29 13:06:17 +00:00
README.md Initial commit 2018-03-22 12:44:32 +01:00

Build

$ docker build --force-rm --no-cache -t envdev/httpd:<version>-<distrib> httpd/<version>/<distrib>/

Usage

Configure Vhosts

php-fpm

Create a file /etc/apache2/sites-enabled/fpm/70.conf and add in your vhost include fpm/70.conf

# Redirect to local php-fpm if mod_php is not available
<IfModule !mod_php7.c>
<IfModule proxy_fcgi_module>
    # Enable http authorization headers
    <IfModule setenvif_module>
    SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
    </IfModule>

    <FilesMatch ".+\.ph(p[3457]?|t|tml)$">
        SetHandler "proxy:fcgi://fpm70/:9000
    </FilesMatch>
    <FilesMatch ".+\.phps$">
        # Deny access to raw php sources by default
        # To re-enable it's recommended to enable access to the files
        # only in specific virtual host or directory
        Require all denied
    </FilesMatch>
    # Deny access to files without filename (e.g. '.php')
    <FilesMatch "^\.ph(p[3457]?|t|tml|ps)$">
        Require all denied
    </FilesMatch>
</IfModule>
</IfModule>

Adapt to any version of PHP-FPM you have