Better apache configs

This commit is contained in:
Girish Ramakrishnan 2018-05-21 10:07:27 -07:00
parent e3f3ca1de7
commit 345421b682
3 changed files with 26 additions and 8 deletions

View File

@ -24,15 +24,16 @@ RUN wget https://github.com/FreshRSS/Extensions/archive/${EXTENSIONS_VERSION}.ta
&& ln -s /app/data/extensions /app/code/extensions \ && ln -s /app/data/extensions /app/code/extensions \
&& ln -s /app/data/extensions/ttrss.php /app/code/p/api/ttrss.php && ln -s /app/data/extensions/ttrss.php /app/code/p/api/ttrss.php
ADD apache2.conf /etc/apache2/sites-available/freshrss.conf # configure apache
RUN rm /etc/apache2/sites-enabled/*
RUN sed -e 's,^ErrorLog.*,ErrorLog "|/bin/cat",' -i /etc/apache2/apache2.conf
COPY apache/mpm_prefork.conf /etc/apache2/mods-available/mpm_prefork.conf
RUN rm /etc/apache2/sites-enabled/* \ RUN a2disconf other-vhosts-access-log
&& sed -e 's,^ErrorLog.*,ErrorLog "/dev/stderr",' -i /etc/apache2/apache2.conf \ ADD apache/freshrss.conf /etc/apache2/sites-enabled/freshrss.conf
&& sed -e "s,MaxSpareServers[^:].*,MaxSpareServers 5," -i /etc/apache2/mods-available/mpm_prefork.conf \ RUN echo "Listen 8000" > /etc/apache2/ports.conf
&& a2disconf other-vhosts-access-log \
&& echo "Listen 8000" > /etc/apache2/ports.conf \ RUN a2enmod headers expires
&& a2enmod headers expires \
&& a2ensite freshrss
RUN rm -rf /var/lib/php \ RUN rm -rf /var/lib/php \
&& ln -s /run/php /var/lib/php \ && ln -s /run/php /var/lib/php \

17
apache/mpm_prefork.conf Normal file
View File

@ -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 6
# Recycle process after handling these many requests. This protected against accidental memory leaks
MaxConnectionsPerChild 100
</IfModule>