Apache

Apache: Memory Leak - Tweaking Prefork

Posted on

On htop, got over 100 apache threads. Changed <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxRequestWorkers 150 MaxConnectionsPerChild 0 </IfModule>   To <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxRequestWorkers 150 MaxConnectionsPerChild 5000 </IfModule> Will test.

Apache

Apache: Change Default Not Found Image

Posted on

This is globally controlled by apache, or locally controlled by your .htaccess file (which basically changes the local apache configurations on local folders). Just add the following code to your .haccess file and¬†adjust as per your requirements   RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} \.(gif|jpg|jpeg|png)$ RewriteRule .* /var/www/html/malla-supply/img/p/en.jpg [L]   To do it Programatically […]

Apache

Apache: Edit Listing Format

Posted on

This is accomplished by adding some directives on the .htaccess. The first step is to enable the .htaccess in your directory, this needs to be enables in /etc/apache2/apache2.conf   CHANGE <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride ALL Require all granted </Directory>   TO <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride ALL Require all granted </Directory>   […]