K
K
Kirsan_vatnik2020-10-15 14:54:03
Nginx
Kirsan_vatnik, 2020-10-15 14:54:03

How does location processing work in Nginx?

server {
  listen 81;
  root  /usr/share/nginx/html/app;
  
  location / {
    try_files $uri $uri/ /index.html;
  }

  location = /admin {
    alias /usr/share/nginx/html/app2;
  }
}

How to deal with the processing of locaiton / admin?
I would like it to open along the /admin path, but it only works if there is a slash at the end of the uri.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question