A
A
Aristarchus2019-07-31 15:32:06
Nginx
Aristarchus, 2019-07-31 15:32:06

Nested location nginx .?

Hello!
There is a site, the current config is valid for it:

location / {
  try_files $uri $uri/ /index.php?$args;
  rewrite "/ajax" /index.php?a=ajax last;
  rewrite "/min" /index.php?a=min last;
  rewrite "/login" /index.php?a=login last;
  rewrite "/register" /index.php?a=register last;
  rewrite "/logout" /index.php?a=logout last;
  rewrite "/lostpass" /index.php?a=lostpass last;
}
location /news {
  rewrite ^/news/([0-9]+)(/?)+$ /index.php?a=news&p=$1 last;
}
location /page {
  rewrite ^/page/(.*)$ /index.php?a=page&p=$1 last;
}

I want to transfer all site files to the asd folder relative to this directory, but I can rewrite the config :c

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
paran0id, 2019-07-31
@paran0id

Set asd folder as root? Or make an alias on it? Or replace /index.php with /asd/index.php ? I did not quite understand what you want to shift and what result you want to get.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question