Welcome! Log In Create A New Profile

Advanced

alias

Matthew Ngaha
December 09, 2013 12:06PM
hi all, i just had a quick question about this example.
____________________________________________________________________
http {
server {
server_name localhost;
root /var/www/website.com/html;
location /admin/ {
alias /var/www/locked/;
}
}
}
When a request for http://localhost/ is received, files are served from the
/var/www/website.com/html/ folder. However, if Nginx receives a request for
http://localhost/admin/, the path used to retrieve the files is /home/website.
com/locked/.
____________________________________________________________________

my question is about the alias variable inside the location /admin/ {}
block. It clearly shows /var/www/locked/ as its path, but when
explained below, it says the path is /home/website.com/locked/..

Please can someone tell me how:
/home/website.com/locked/ == /var/www/locked/ ??
I'm new to linux so maybe it's something i'm unaware of.

also the path having website.com in it. Does this mean a directory was
named website.com, with the period?

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

alias

Matthew Ngaha December 09, 2013 12:06PM

Re: alias

Francis Daly December 09, 2013 01:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 91
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready