Welcome! Log In Create A New Profile

Advanced

Re: change root to uplevel folder

September 01, 2017 10:04AM
You can use location and there override root

location =/test.php {
root /www;
...
}

On Fri, Sep 1, 2017 at 1:54 PM, growield <nginx-forum@forum.nginx.org>
wrote:

> Hello. I have site that have root /www/site
> but i must to get some file from /www. How can i change root only for one
> this file?
>
> For example
> some.domain.com/index.php?key=ss
> if $key is number rewrite to
> some.domain.com/test.php?key=12
>
> But test.php locates in /www not in /www/site
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?21,276213,276213#msg-276213
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

change root to uplevel folder

growield September 01, 2017 06:54AM

Re: change root to uplevel folder

ALex_hha September 01, 2017 10:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 299
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready