Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
deb13:apache [2026/09/19 16:21] – [Check configuration] Bernard Condraudeb13:apache [2026/11/15 09:03] (current) – [PHP Extensions] Bernard Condrau
Line 12: Line 12:
   - If you are migrating from an old server, follow the [[deb11:migrate#apache_2.4|How to migrate a (web) server]] guide   - If you are migrating from an old server, follow the [[deb11:migrate#apache_2.4|How to migrate a (web) server]] guide
   - Run ''apachectl configtest'' before reloading apache   - Run ''apachectl configtest'' before reloading apache
 +
 ===== Apache Settings ===== ===== Apache Settings =====
- 
-==== Harden apache ==== 
-  * change //ServerTokens// and //ServerSignature// in /etc/apache2/conf.d/security.conf 
-  * add //Require all granted// to your web space, possibly exclude black listed ip addresses, and restrict access to phpmyadmin etc. Put a respective conf file into /etc/apache2/conf.d. 
- 
-==== MaxRequestedWorkers ==== 
-Modify /etc/apache2/mods-available/mpm-prefork.conf and restart apache2<code>$ sudo apache2ctl -V | grep MPM 
-vim /etc/apache2/mods-available/mpm-prefork.conf 
-  MaxRequestedWorkers 400 
-  ServerLimit 400 
-$ sudo service apache2 restart</code> 
- 
 ==== Basic configuration for your web root ==== ==== Basic configuration for your web root ====
   * Add your custom configuration file ''/etc/apache2/conf-available/my-webspace'':<code># grant access to bco's web space   * Add your custom configuration file ''/etc/apache2/conf-available/my-webspace'':<code># grant access to bco's web space
Line 52: Line 41:
   * Check the configuration and fix errors if you have any:<code>sudo apache2ctl configtest</code>   * Check the configuration and fix errors if you have any:<code>sudo apache2ctl configtest</code>
   * Restart the web server:<code>sudo systemctl restart apache2</code>   * Restart the web server:<code>sudo systemctl restart apache2</code>
 +
 +==== Harden apache ====
 +  * change //ServerTokens// and //ServerSignature// in /etc/apache2/conf.d/security.conf
 +  * add //Require all granted// to your web space, possibly exclude black listed ip addresses, and restrict access to phpmyadmin etc. Put a respective conf file into /etc/apache2/conf.d.
 +
 +==== MaxRequestedWorkers ====
 +Modify /etc/apache2/mods-available/mpm-prefork.conf and restart apache2<code>$ sudo apache2ctl -V | grep MPM
 +vim /etc/apache2/mods-available/mpm-prefork.conf
 +  MaxRequestedWorkers 400
 +  ServerLimit 400
 +$ sudo service apache2 restart</code>
  
 ==== Check configuration ==== ==== Check configuration ====
Line 74: Line 74:
  
 ===== PHP Extensions ===== ===== PHP Extensions =====
-  * PHP extensions for Joomla:<code>$ sudo apt install phpV.v-{bz2 curl gd mbstring mysql xml zip} phpV.v-{bcmath}</code> +  * PHP extensions for Joomla:<code>$ sudo apt install php- or phpV.v-{bz2 curl gd mbstring mysql xml zip} phpV.v-{bcmath intl}</code> 
-  * PHP extensions for Wiki:<code>$ sudo apt install phpV.v-{bz2 curl gd mbstring mysql xml zip} phpV.v-{sqlite3}</code> +  * PHP extensions for Wiki:<code>$ sudo apt install php- or phpV.v-{bz2 curl gd mbstring mysql xml zip json curl} phpV.v-{sqlite3}</code> 
-  * PHP extensions for phpMyAdmin:<code>$ sudo apt install phpV.v-mbstring</code> +  * PHP extensions for phpMyAdmin:<code>$ sudo apt install php- or phpV.v-{mbstring json curl}</code> 
-  * PHP extensions for vps:<code>$ sudo apt install phpV.v-{curl xml zip}</code> +  * PHP extensions for vps:<code>$ sudo apt install php- or phpV.v-{curl xml zip}</code> 
-  * Required for PHP7:<code>$ sudo apt install phpV.v-json</code> +  * Restart the service:<code>$ sudo systemctl restart apache2</code>
-  * Restart the service with one of the 2 commands below:<code>$ sudo systemctl restart apache2 +
-$ sudo service apache2 restart</code>+
  
 ===== Set or change PHP version ===== ===== Set or change PHP version =====
Line 108: Line 106:
  
 ==== php.ini ==== ==== php.ini ====
-  * <code>max_execution_time = 120+  * <code>max_execution_time = 300
 max_input_vars = 2000 max_input_vars = 2000
 memory_limit = 512M memory_limit = 512M