Answer the question
In order to leave comments, you need to log in
NGINX application in a subdirectory, how to give assets correctly?
In the '/blog' subdirectory of the application I want to show another application (wordpress)
location /blog {
rewrite ^/blog/(.*)$ /$1 break;
proxy_pass http://example.com;
proxy_redirect off;
}
try_files $uri @new;
location @new {
# something
}
Answer the question
In order to leave comments, you need to log in
It's not very clear, I'll try to figure it out.
If you need one to open in /blog, and another in all other places, then this is done by two locations - /blog
and /
. No rewrites are needed, just add your wordpress in the first one, and the standard behavior / directories / whatever you have in the second one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question