I don't understand why nginx cannot find files when the root is under home directory, e.g. /home/ubuntu/tabs. It will give 404 error.
It works fine when the root is /var/www/tabs.
server{
listen 80;
#root /var/www/tabs;
root /home/ubuntu/tabs;
server_name 18.191.229.199;
index main.html ;
location / {
try_files $uri $uri/ =404;
}
location /folder {
try_files /folder/main1.html /folder/main2.html =404;
}
}