Selaa lähdekoodia

move apache configs to separate directory

Girish Ramakrishnan 7 vuotta sitten
vanhempi
commit
6c86399a8b
3 muutettua tiedostoa jossa 20 lisäystä ja 1 poistoa
  1. 3 1
      Dockerfile
  2. 0 0
      apache/lamp.conf
  3. 17 0
      apache/mpm_prefork.conf

+ 3 - 1
Dockerfile

@@ -41,12 +41,14 @@ RUN apt-get update && apt-get install -y php libapache2-mod-php crudini \
     cron \
     && rm -rf /var/cache/apt /var/lib/apt/lists /etc/ssh_host_*
 
+
 # configure apache
 RUN rm /etc/apache2/sites-enabled/*
 RUN sed -e 's,^ErrorLog.*,ErrorLog "|/bin/cat",' -i /etc/apache2/apache2.conf
-RUN sed -e "s,MaxSpareServers[^:].*,MaxSpareServers 5," -i /etc/apache2/mods-available/mpm_prefork.conf
+COPY apache/mpm_prefork.conf /etc/apache2/mods-available/mpm_prefork.conf
 
 RUN a2disconf other-vhosts-access-log
+ADD apache/lamp.conf /etc/apache2/sites-enabled/lamp.conf
 RUN echo "Listen 80" > /etc/apache2/ports.conf
 RUN a2enmod rewrite authnz_ldap headers
 

+ 0 - 0
apache2-app.conf → apache/lamp.conf


+ 17 - 0
apache/mpm_prefork.conf

@@ -0,0 +1,17 @@
+<IfModule mpm_prefork_module>
+    # On startup, start these many servers
+	StartServers	2
+
+    # At any given time, keep atleast these many servers
+	MinSpareServers	2
+
+    # At any given time, keep atmost these many idle servers (this is always >= MinSpareServers+1)
+	MaxSpareServers 3
+
+    # Maximum number of servers at any given instant. Requests will be queued after this
+	MaxRequestWorkers	  15
+
+    # Recycle process after handling these many requests. This protected against accidental memory leaks
+	MaxConnectionsPerChild   100
+</IfModule>
+