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/05/18 15:54] – [PHP Installation] Bernard Condraudeb13:apache [2026/07/21 16:53] (current) – [PHP Installation] Bernard Condrau
Line 1: Line 1:
-====== Apache 2.4 and PHP 8 ======+====== Apache 2.4 and PHP 8.4 ====== 
 +add the following:<code>RequestHeader set X-Forwarded-Proto "https" env=HTTPS 
 +SetEnvIfNoCase X-Forwarded-Proto https HTTPS=on</code>
 ===== Apache 2.4 Installation ===== ===== Apache 2.4 Installation =====
   - Install apache 2.4<code>$ sudo apt update   - Install apache 2.4<code>$ sudo apt update
Line 9: Line 11:
   - Install and configure [[deb11:certbot|Let's Encrypt Certbot]]   - Install and configure [[deb11:certbot|Let's Encrypt Certbot]]
   - 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
 ===== Apache Settings ===== ===== Apache Settings =====
  
Line 28: Line 30:
 ===== PHP Installation ===== ===== PHP Installation =====
   - Download the GPG key:<code>$ sudo apt update   - Download the GPG key:<code>$ sudo apt update
-$ curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg</code>+sudo curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg</code>
   - Add the repository to your sources<code>$ echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list</code>   - Add the repository to your sources<code>$ echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list</code>
   - Install the desired PHP version, where V is the major and v is the minor version number, for example 8.4<code>$ sudo apt update   - Install the desired PHP version, where V is the major and v is the minor version number, for example 8.4<code>$ sudo apt update