Welcome! Log In Create A New Profile

Advanced

Re: root works, alias doesn't

Valentin V. Bartenev
October 01, 2013 09:56AM
On Sunday 29 September 2013 23:20:35 B.R. wrote:
[...]
> ​For​
>
> ​what you wish to do, you might try the following:
>
> set $rootDir /var/www/localhost/htdocs
> root $rootDir/;
> location / {
> alias $rootDir/webalizer/;
> }
>
> alias is meant for exceptional overload of root in a location block, so I
> guess its use here is a good idea.​
> However, there seems to be no environmental propagation of some $root
> variable (which may be wanted by developers to avoid confusion and unwanted
> concatenation of values in the variables tree).
[..]

nginx is not trying to be a template engine.
http://nginx.org/en/docs/faq/variables_in_config.html

wbr, Valentin V. Bartenev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

root works, alias doesn't

Grant September 25, 2013 02:16PM

Re: root works, alias doesn't

B.R. September 25, 2013 02:28PM

Re: root works, alias doesn't

Grant September 29, 2013 01:34PM

Re: root works, alias doesn't

B.R. September 29, 2013 03:22PM

Re: root works, alias doesn't

Grant October 01, 2013 03:14AM

Re: root works, alias doesn't

Valentin V. Bartenev October 01, 2013 10:10AM

Re: root works, alias doesn't

Grant October 02, 2013 12:24PM

Re: root works, alias doesn't

Valentin V. Bartenev October 02, 2013 02:24PM

Re: root works, alias doesn't

Grant October 02, 2013 03:04PM

Re: root works, alias doesn't

Valentin V. Bartenev October 01, 2013 09:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
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