Answer the question
In order to leave comments, you need to log in
OpenServer, Nginx, how to host 2 sites on the same domain?
I’m completely confused, I won’t unravel without advice)
WordPress is hanging on the site.com domain.
It is necessary to make a "single entry point at the address site.com/lp/
That is, everything that does not start with /lp/ goes to WordPress for processing, everything else is exclusively on index.php which lies in the /lp/ subdirectory.
location / {
root "%hostdir%";
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location /lp/.* {
root "%hostdir%";
index index.php;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
Answer the question
In order to leave comments, you need to log in
Нашел решение. Пока всё работает исправно.
root "%hostdir%";
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location /lp {
try_files $uri $uri/ /lp/index.php?q=$uri&$args;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question