Putting a site or an application online
Your VPS Pro serves your sites and your applications under their domain name, over HTTP and HTTPS. Visitors arrive on ports 80 and 443 of your server, under your server's name; HTTPS encryption runs end to end, all the way to your server, where your certificate lives.
1. Point your domain to your server
Wherever your domain's DNS zone is managed, create two records for your server's name, with the addresses shown in its card, VPS section of your client area:
| Type | Name | Value |
|---|---|---|
A | app (or @ for the domain itself) | the IPv4 address from your card |
AAAA | app (or @) | the IPv6 address from your card |
A name under vps.simafri.cloud already works: there is nothing to create.
When your domain's DNS zone is managed by Simafri, our team sets up these records for you: write to us. Before switching over a site that is already live, also ask us to lower the record's time to live (TTL): the switchover then propagates in a few minutes.
To check from your computer:
dig +short A app.my-company.com
dig +short AAAA app.my-company.com
2. Install your web server
Your web server listens on port 80 for HTTP and port 443 for HTTPS. Two common choices:
- Caddy, which obtains and renews your HTTPS certificate on its own;
- Nginx or Apache, with Certbot for the certificate.
With Caddy
apt install caddy
Then, in /etc/caddy/Caddyfile, for a static site:
app.my-company.com {
root * /var/www/app
file_server
}
or for an application listening on port 3000:
app.my-company.com {
reverse_proxy 127.0.0.1:3000
}
systemctl reload caddy, and your site answers over HTTPS: Caddy has obtained the certificate and will renew it on its own.
With Nginx and Certbot
apt install nginx certbot python3-certbot-nginx
Create the site in /etc/nginx/sites-available/app:
server {
listen 80;
listen [::]:80;
server_name app.my-company.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Enable it, then request the certificate:
ln -s /etc/nginx/sites-available/app /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx
certbot --nginx -d app.my-company.com
Certbot installs the Let's Encrypt certificate, adds listening on port 443 and schedules its automatic renewal. certbot renew --dry-run checks that the renewal is ready.
3. Keep your application running
A Node.js, Python, Go or Java application that runs continuously is entrusted to systemd: it starts with the server and restarts on its own if it stops. Example, in /etc/systemd/system/app.service:
[Unit]
Description=My application
After=network.target
[Service]
WorkingDirectory=/srv/app
ExecStart=/usr/bin/node server.js
Restart=always
Environment=NODE_ENV=production
User=www-data
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable --now app
journalctl -u app -f # follow its logs
PM2 for Node.js, Gunicorn or Uvicorn for Python, or Docker Compose fill the same role if you prefer them.
4. Your database
PostgreSQL, MySQL, MariaDB, Redis or MongoDB install on your server with the package manager, or from the vendor's official repository for the latest version:
apt install postgresql
Keep your database listening on localhost: your application reaches it on the server itself. To administer it from your computer, go through an SSH tunnel:
ssh -p 22101 -L 5432:localhost:5432 root@app.my-company.com
Your tool (DBeaver, pgAdmin, TablePlus) then connects to localhost:5432.
Serving several domains
Your server answers under its name, set when you order. To serve another domain or another subdomain on the same VPS Pro, write to support with the names to add: our team connects them to your server, then you create their DNS records as in step 1 and add their block to your web server.
Frequently asked questions
My site shows a certificate error.
Check in this order: your A and AAAA records point to the addresses on your card (dig), your web server listens on ports 80 and 443 (ss -tlnp), and the certificate covers this name (certbot certificates). The certificate is obtained once the name points to your server: run Certbot again, or reload Caddy, after DNS propagation.
My site does not respond at all.
On the server, curl -I http://localhost shows whether your web server responds. systemctl status nginx (or caddy, or your service) and its logs tell you why it stopped. Describe what you are seeing to support: Full-Stack Assistance diagnoses it with you.
Can I install WordPress, Laravel or Symfony?
Yes: install PHP-FPM, your database and your web server, then your application, as on any Linux server. Full-Stack Assistance tells you the settings suited to your project, step by step.