Sign inSign up

mlefkon/alpine-apache

By mlefkon

Updated 5 months ago

Simple HTTP server. Overrides allowed, no indexes allowed. DocRoot is /www

Image
0

993

mlefkon/alpine-apache repository overview

Barebones Apache in Lightweight Alpine Container

Configuration

Environment Variables
  • INDEX_HTML_TEXT: default: undefined, Set to a text string to create the html of an index.html file. This is used to set up a simple site with just one landing page (no need to mount a volume to /www).
Directories
  • /www: Web-root. Mount volumes here to host a simple static site. Unnecessary for simple site using just INDEX_HTML_TEXT.
CGI

To enable CGI do the following:

  1. Use a volume-file mount to create a file in /etc/apache2/conf.d/enable-cgi.conf with the following contents: LoadModule cgi_module modules/mod_cgi.so
  2. Then setup an .htaccess file in the directory containing the scripts, for example:
    Options +ExecCGI
    AddHandler cgi-script .cgi
  1. Target CGI shell executables to operate in Alpine's /bin/sh environment
  2. CGI executables should give executable permissions to 'o'ther (755) so that the container's apache user can execute it.

Tag summary

Content type

Image

Digest

sha256:2d342a63c

Size

5.1 MB

Last updated

5 months ago

docker pull mlefkon/alpine-apache