This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
computing:selfhostedwp [2023/06/30 03:25] – oemb1905 | computing:selfhostedwp [2023/12/16 20:33] (current) – oemb1905 | ||
---|---|---|---|
Line 15: | Line 15: | ||
sudo apt install apache2 mariadb-server php8.2 php-common php-cgi php-cli php-zip php-mysql php-mbstring php-intl php-fpm php-curl php-gd php-imagick php-xml php-xmlrpc php-soap php-opcache php-apcu php-bcmath memcached wget unzip | sudo apt install apache2 mariadb-server php8.2 php-common php-cgi php-cli php-zip php-mysql php-mbstring php-intl php-fpm php-curl php-gd php-imagick php-xml php-xmlrpc php-soap php-opcache php-apcu php-bcmath memcached wget unzip | ||
| | ||
- | Sometimes dpkg can choose which version of php you want and it's not always the version you want. In those cases, you can explicitly specify the version you need as follows: | + | Sometimes dpkg can choose which version of php you want and it's not always the version you want. In those cases, you can explicitly specify the version you need. Some packages are only available |
| | ||
- | sudo apt-get install php8.2-{common, | + | sudo apt-get install php8.2-{common, |
| | ||
Apache2 will set up a 000-default.conf automatically and your host should now resolve. Be sure to set up TLS with certbot. Here's my preferred method: | Apache2 will set up a 000-default.conf automatically and your host should now resolve. Be sure to set up TLS with certbot. Here's my preferred method: | ||
Line 29: | Line 29: | ||
| | ||
sudo apt remove libapache2-mod-php* --purge | sudo apt remove libapache2-mod-php* --purge | ||
+ | sudo apt install php8.3-fpm php8.3-cgi | ||
sudo a2enmod ssl | sudo a2enmod ssl | ||
sudo a2enmod headers | sudo a2enmod headers | ||
sudo a2enmod cache | sudo a2enmod cache | ||
sudo a2enmod rewrite | sudo a2enmod rewrite | ||
- | sudo a2enmod setenvif | + | sudo a2enmod setenvif |
+ | sudo a2dismod php8.1 | ||
sudo a2dismod php8.2 | sudo a2dismod php8.2 | ||
+ | sudo a2dismod php8.3 | ||
sudo a2dismod mpm_prefork | sudo a2dismod mpm_prefork | ||
sudo a2enmod mpm_event | sudo a2enmod mpm_event | ||
sudo a2enmod proxy | sudo a2enmod proxy | ||
sudo a2enmod proxy_fcgi | sudo a2enmod proxy_fcgi | ||
- | sudo a2enconf php8.2-fpm | + | sudo a2enconf php8.3-fpm |
- | sudo a2enconf php8.2-cgi | + | sudo a2enconf php8.3-cgi |
sudo apache2ctl configtest | sudo apache2ctl configtest | ||
sudo systemctl restart apache2 | sudo systemctl restart apache2 | ||
- | sudo systemctl restart php8.2-fpm | + | sudo systemctl restart php8.3-fpm |
There are two standard ways to configure php-fpm. One of those is to use ProxyPassReverse, | There are two standard ways to configure php-fpm. One of those is to use ProxyPassReverse, |