Show index.html: how to make good config

Solution 1:

Your problem is the root directive. It tells nginx to use the given path as the root (domain.com/) of the request. In your case nginx uses /home/.../docs/push as the root. When you enter domain.com/push, nginx searches for the index file in /home/.../docs/push/push.

root is usually used to define for the whole server block:

server {
    listen 80;
    root /home/.../docs;

    location / {
        try_files $uri $uri/ =404;
    }
}

or if you /push/ to link to an entirely different path use alias:

server 80 {
    listen 80;

    location / {
        alias /home/.../docs/push;
        try_files $uri $uri/ =404;
    }
}