D
D
Davydoff32020-02-26 14:37:49
Nginx
Davydoff3, 2020-02-26 14:37:49

Why is the site not opening on nginx?

When I try to access a site by domain, I get the error "Unable to access the site." By ip everything is fine.

server {
        listen 80;
        root /var/www/html;
        index index.html;
}

server {
    listen 80;
    server_name <moi_domen> www.<moi_domen>;
    root /var/www/html;
    index index.html;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail, 2020-02-26
@RuComMarket

and on the domain at you the direction where goes?
if you come "from outside" then you need to register the ns server on the domain,
if from the local direction, then you need to register the direction of the domain to localhost in hosts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question