Location intelligence use cases using docker container.
Create a directory to serve
sudo mkdir -p /var/www/subdomain.domain.my/html
ls /var/www
sudo chown -R $USER:$USER /var/www/subdomain.domain.my/html
sudo chown -R 755 /var/www/subdomain.domain.myAdd a default webpage
cd /var/www/subdomain.domain.my/html
sudo nano index.htmlAdd default html content
<html>
<head>
<title>Welcome to subdomain.domain.my!</title>
</head>
<body>
<h1>Success! The subdomain.domain.my server block is working!</h1>
</body>
</html>Create a configuration file
cd /etc/nginx/sites-available/
sudo touch subdomain.domain.my
sudo nano subdomain.domain.my
Add configuration content. see sample configuration files content for images specefic content.
server {
listen 80;
listen [::]:80;
root /var/www/subdomain.domain.my/html;
index index.html index.htm index.nginx-debian.html;
server_name subdomain.domain.my;
proxy_redirect off;
location / {
try_files $uri $uri/ =404;
}
}Enable the site
sudo ln -s /etc/nginx/sites-available/subdomain.domain.my /etc/nginx/sites-enabled/
sudo ls /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginxMake sure your subdomain is setup and run Certbot to enable SSL
sudo ufw status
sudo certbot --nginx -d subdomain.domain.my
sudo certbot renew --dry-run