Answer the question
In order to leave comments, you need to log in
Why doesn't nginx render the route correctly?
I'm scratching my head with nginx. There is a simple config leading to hello world index.html.
Why does this config work:
server {
listen 80;
server_name localhost;
location / {
root /www/id/html;
index index.html index.htm;
}
}
server {
listen 80;
server_name localhost;
location /application1/ {
root /www/id/html;
index index.html index.htm;
}
}
Answer the question
In order to leave comments, you need to log in
In the direction of alias, see: https://qna.habr.com/q/78932
Nginx is trying to open the /www/id/html/application1/index.html file (the root + path directive from the URL), you can see this in the error log.
No need to rack your brains, you need to read the documentation .
Beginner's Guide
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question