Three paths, same result
Before you start, choose how you want to work:
- Path A, manual (the guide below): you install and configure Nginx, PHP, MariaDB and SSL yourself. Full control over every setting. Takes about 45 minutes. Recommended if you are comfortable with Linux or want to understand exactly what is running.
- Path B, a free control panel: you install an open source panel on the VPS that handles sites, databases, email and SSL from a web interface. Takes about 10 to 15 minutes.
- Path C, no server to manage: go straight for Wiptor web hosting, with the Wiptor Cloud Panel, free SSL and backups included. Nothing to install.
If you have never used Linux, pick B or C. If you want to learn or need special settings, pick A.
Path A: manual setup
What we are building
Nginx as the web server, PHP 8.3 with FPM, MariaDB for databases, free Let's Encrypt SSL certificates with automatic renewal and a separate configuration for each domain. We start from a fresh VPS with Ubuntu 24.04 and root access.
Before anything else, it is a good idea to secure your server: how to secure your VPS, step by step. If you set up a firewall, remember to open ports 80 and 443.
Step 1: connect and update
ssh root@SERVER_IP
apt update && apt upgrade -y
reboot
Step 2: install Nginx
apt install nginx -y
systemctl enable --now nginx
Open the server's IP in a browser. If you see the Nginx welcome page, it works.
Step 3: install PHP 8.3
apt install php8.3-fpm php8.3-mysql php8.3-curl php8.3-gd php8.3-mbstring php8.3-xml php8.3-zip php8.3-intl -y
systemctl enable --now php8.3-fpm
Step 4: install MariaDB
apt install mariadb-server -y
systemctl enable --now mariadb
mariadb-secure-installation
Answer the prompts: remove anonymous users, disallow remote root login and delete the test database.
Create a database for your first site:
mariadb
CREATE DATABASE site1_db;
CREATE USER 'site1_user'@'localhost' IDENTIFIED BY 'a_strong_password';
GRANT ALL PRIVILEGES ON site1_db.* TO 'site1_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 5: configure your first site
mkdir -p /var/www/site1.com/public
chown -R www-data:www-data /var/www/site1.com
nano /etc/nginx/sites-available/site1.com
Paste the configuration:
server {
listen 80;
server_name site1.com www.site1.com;
root /var/www/site1.com/public;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
}
location ~ /\. {
deny all;
}
}
Enable it and reload Nginx:
ln -s /etc/nginx/sites-available/site1.com /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx
Step 6: free SSL with Let's Encrypt
The domain must already point to the VPS IP (an A record in DNS). Then:
apt install certbot python3-certbot-nginx -y
certbot --nginx -d site1.com -d www.site1.com
certbot renew --dry-run
The last command checks that automatic renewal works. Certificates renew by themselves from now on.
Step 7: more sites
For each new site, repeat step 5 (new folder, new configuration, enable it) and step 6 (SSL). Once you get the hang of it, a new site takes about two minutes.
Step 8: WordPress (optional)
cd /var/www/site1.com/public
wget https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz --strip-components=1
rm latest.tar.gz
chown -R www-data:www-data /var/www/site1.com
Open the domain in a browser and follow the WordPress installer, using the database from step 4.
Path B: a free control panel
There are several free, open source control panels that install the web server, PHP, MariaDB, DNS, email and SSL with a single command and give you a web interface where you add sites, databases and email accounts in a few clicks. Two well-known options are CloudPanel and aaPanel.
What to know first:
- Install it on a fresh VPS. Most panels need a clean system without Nginx or MariaDB already installed.
- Read the official documentation of the panel you choose: each has its own system requirements and install steps.
- Secure the panel too: a strong password, two-factor login if available and up-to-date software.
What comes next
Your hosting is running. The next step, whichever path you chose, is server security.
Read the security guide: How to secure your VPS, step by step
At Wiptor
Storage VPS plans are the right base for paths A and B: NVMe storage means PHP, databases and WordPress load everything at full speed, and you have root access from minute one. They start at €9/month with 100 GB NVMe.
And if you just want websites without managing a server, Wiptor web hosting starts at €1.99/month with the Wiptor Cloud Panel, free SSL and backups. On the Nano and Starter plans the first month is free with the code WEBHOSTFREE.
See Storage VPS plans · See web hosting
Ready to deploy your server?
Game servers from €3/month, instant activation and DDoS protection included.
See plans →