Skip to main content

Website with nginx

Nginx

Install Nginx with

sudo apt install nginx
sudo service nginx start
sudo systemctl enable nginx

Create a new Configuration File with:
sudo vim /etc/nginx/sites-available/mywebsite
and test ist with sudo nginx -tand then restart with sudo service nginx restart

PHP

install php 8.3 with

apt-get install ca-certificates apt-transport-https software-properties-common
# Add Ondrej's PPA
sudo add-apt-repository ppa:ondrej/php
sudo apt update

# Install new PHP 8.3 packages
sudo apt install php8.3 php8.3-cli php8.3-{bz2,curl,mbstring,intl}

# Install FPM OR Apache module
sudo apt install php8.3-fpm
# OR
# sudo apt install libapache2-mod-php8.2

# On Apache: Enable PHP 8.3 FPM
sudo a2enconf php8.3-fpm