Answer the question
In order to leave comments, you need to log in
How to configure nginx static return rules?
There is a task that from one virtual folder files from different places undertook. For example, /img/icons/ should be taken from the /home/user/public/icon folder and /img/ui/ from the /home/user/public/ui folder, while /img/logo/ from the /home/user/ folder storage/. How can I write a general rule for the icons and ui folders, since there may be more folders there.
Answer the question
In order to leave comments, you need to log in
IMHO, the most reasonable thing is to spread it to different locations, indicating each root. Those. something along the lines of:
location /img/icons {
root /home/user/public/icon;
...
}
location /img/ui {
root /home/user/public/ui;
...
}
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question