Welcome! Log In Create A New Profile

Advanced

Re: alias

Francis Daly
December 09, 2013 01:34PM
On Mon, Dec 09, 2013 at 05:03:55PM +0000, Matthew Ngaha wrote:

Hi there,

> hi all, i just had a quick question about this example.

Where does the example come from? It may be worth asking the author to
fix it.

> http {
> server {
> server_name localhost;
> root /var/www/website.com/html;
> location /admin/ {
> alias /var/www/locked/;
> }
> }
> }

If you ask for http://localhost/request.html, nginx will try to
send the file /var/www/website.com/html/request.html. If you ask for
http://localhost/admin/request.html, nginx will try to send the file
/var/www/locked/request.html.

> 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/..

The explanation is wrong.

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

Yes.

f
--
Francis Daly francis@daoine.org

_______________________________________________
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: 324
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