diff --git a/Dockerfile b/Dockerfile index ff2aca62..ffa094db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -95,7 +95,8 @@ ENV MS_DEBUGLEVEL=0 \ MAX_PROCESSES=5 \ BUSY_TIMEOUT=300 \ IDLE_TIMEOUT=300 \ - IO_TIMEOUT=40 + IO_TIMEOUT=40 \ + APACHE_LIMIT_REQUEST_LINE=8190 RUN adduser www-data root && \ chmod -R g+w ${APACHE_CONFDIR} ${APACHE_RUN_DIR} ${APACHE_LOCK_DIR} ${APACHE_LOG_DIR} /etc/confd /etc/mapserver /var/lib/apache2/fcgid /var/log && \ diff --git a/README.md b/README.md index 441ac4b9..98db42ce 100644 --- a/README.md +++ b/README.md @@ -34,20 +34,22 @@ create a file at the same location, with just the `.tmpl` extension removed. You can use the following environment variables (when starting the container) to tune it: -- MS_DEBUGLEVEL: The debug level 0=off 5=verbose -- MS_ERRORFILE: If you want the debug to something other than STDOUT -- MAX_REQUESTS_PER_PROCESS: To work around memory leaks (defaults to 1000) -- MIN_PROCESSES: The minimum number of fcgi processes to keep (defaults to 1) -- MAX_PROCESSES: The maximum number of fcgi processes to keep (defaults to 5) -- MAPSERVER_CATCH_SEGV: Set to 1 to have the stacktraces in case of crash -- LISTEN_PORT_80: When running the container as an unprivileged user, apache - will listen to port 8080 instead of 80. Set to 1 force listening to port 80 +- `MS_DEBUGLEVEL`: The debug level `0`=off `5`=verbose +- `MS_ERRORFILE`: If you want the debug to something other than STDOUT +- `MAX_REQUESTS_PER_PROCESS`: To work around memory leaks (defaults to `1000`) +- `MIN_PROCESSES`: The minimum number of fcgi processes to keep (defaults to `1`) +- `MAX_PROCESSES`: The maximum number of fcgi processes to keep (defaults to `5`) +- `MAPSERVER_CATCH_SEGV`: Set to 1 to have the stacktraces in case of crash +- `LISTEN_PORT_80`: When running the container as an unprivileged user, apache + will listen to port `8080` instead of `80`. Set to 1 force listening to port `80` instead. -- BUSY_TIMEOUT: The maximum time limit for request handling (defaults to 300) -- IDLE_TIMEOUT: Application processes which have not handled a request for - this period of time will be terminated (defaults to 300) -- IO_TIMEOUT: The maximum period of time the module will wait while trying to - read from or write to a FastCGI application (defaults to 40) +- `BUSY_TIMEOUT`: The maximum time limit for request handling (defaults to `300`) +- `IDLE_TIMEOUT`: Application processes which have not handled a request for + this period of time will be terminated (defaults to `300`) +- `IO_TIMEOUT`: The maximum period of time the module will wait while trying to + read from or write to a FastCGI application (defaults to `40`) +- `APACHE_LIMIT_REQUEST_LINE`: The maximum size of the HTTP request line in + bytes (defaults to `8190`) ## Running multiple mapfiles diff --git a/runtime/etc/apache2/conf-enabled/mapserver.conf b/runtime/etc/apache2/conf-enabled/mapserver.conf index 44a90ab1..3e066913 100644 --- a/runtime/etc/apache2/conf-enabled/mapserver.conf +++ b/runtime/etc/apache2/conf-enabled/mapserver.conf @@ -5,6 +5,7 @@ FcgidMaxProcessesPerClass ${MAX_PROCESSES} FcgidBusyTimeout ${BUSY_TIMEOUT} FcgidIdleTimeout ${IDLE_TIMEOUT} FcgidIOTimeout ${IO_TIMEOUT} +LimitRequestLine ${APACHE_LIMIT_REQUEST_LINE} ScriptAliasMatch "^/.*" /usr/local/bin/mapserv_wrapper