Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save archidigital/22180dd3ca8b639de3e420c0bb1e2f81 to your computer and use it in GitHub Desktop.

Select an option

Save archidigital/22180dd3ca8b639de3e420c0bb1e2f81 to your computer and use it in GitHub Desktop.
sudo mkdir -p /var/www/devoa.ro/html
sudo nano /var/www/devoa.ro/html/index.html
<html>
<head>
<title>Welcome!</title>
</head>
<body>
<h1>Site under construction!</h1>
</body>
</html>
sudo nano /etc/nginx/sites-available/devoa.ro
server {
root /var/www/devoa.ro/html;
index index.html;
server_name devoa.ro www.devoa.ro;
location / {
try_files $uri $uri/ =404;
}
}
sudo ln -s /etc/nginx/sites-available/devoa.ro /etc/nginx/sites-enabled/
sudo ufw allow 'Nginx Full'
sudo ufw allow 22/tcp
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot --nginx -d devoa.ro

Comments are disabled for this gist.