Publish your first page on a VPS
A bare VPS serves no page: you need a web server, a file and an open port. Nginx is a common choice on Debian, light and simple to configure. The goal here is a static page genuinely reachable over the IPv6 address and, if you have one, over IPv4, without any domain name.
Install Nginx
sudo apt update
sudo apt install -y nginx
sudo systemctl status nginxThe package starts the service and enables it at boot. systemctl status nginx should show active (running). If it fails, read journalctl -u nginx before changing the configuration.
Create the page and document root
sudo mkdir -p /var/www/votre-domaine.fr
sudo chown -R www-data:www-data /var/www/votre-domaine.fr
sudo chmod 755 /var/www/votre-domaine.frThen create /var/www/votre-domaine.fr/index.html with minimal content and set the file mode to 644. Never use chmod 777: the web server only needs to read. The www-data owner lets Nginx serve files without making them writable by everyone.
Declare the site
Create /etc/nginx/sites-available/votre-domaine.fr:
server {
listen 80;
listen [::]:80;
server_name votre-domaine.fr www.votre-domaine.fr;
root /var/www/votre-domaine.fr;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}Enable it with a symlink, then validate before reloading:
sudo ln -s /etc/nginx/sites-available/votre-domaine.fr /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginxnginx -t must report syntax is ok and test is successful. A reload fails cleanly without dropping the running service; a restart drops current connections.
Open port 80
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw status verboseAllow SSH before enabling UFW, or you lose remote access. Rules must appear for both IPv4 and IPv6. If another firewall is active, adapt that command instead of stacking two systems.
Test over IPv6 and IPv4
curl -I http://[VOTRE_IPV6]/
curl -4 -I http://VOTRE_IPV4/Brackets are mandatory in an IPv6 URL. Both requests must return HTTP/1.1 200 OK. If IPv6 works and IPv4 does not, check the address and firewall. From a browser, use the IPv6 test page to confirm the network path. A page reachable by IP but not by name points to DNS, not Nginx.
Quick troubleshooting
- The default Nginx page still appears: check that the symbolic link exists in
sites-enabledand thatserver_namematches the name you used, then reload Nginx. - 403 error: the root directory permissions or owner prevent reading. Set the directory back to
755and the file to644. - Connection refused: port 80 is not open in the firewall, or Nginx is not listening. Check
ss -lntp | grep :80andufw status. - The page works locally but not from the internet: open the IPv6 address in a browser and confirm the service also listens on
[::]:80.
Advertisement
Was this article helpful?
Read next
- Point a domain name to a VPSCreate A and AAAA records, choose the TTL and verify resolution before configuring the server.
- Update Debian on a VPSapt update and upgrade, required reboots and precautions before a release upgrade.
- When to add a dedicated IPv4IPv6 included, IPv4 optional: when IPv4 becomes necessary and how to handle dual stack.