Location Alias not working

Edho Arief me at myconan.net
Sun Aug 28 17:49:13 UTC 2016


Hi,

On Mon, Aug 29, 2016, at 01:59, İhsan Doğan wrote:
> Hi,
> 
> On Saturday, 27 Aug 2016 21:50 +0100, Francis Daly wrote:
> 
> > > I've defined a location alias in my nginx.conf:
> > 
> > > 	location	/foo/ {
> > > 			alias /var/www/foo/;
> > > 	}
> > 
> > > Even the directory /var/www/foo exists, Nginx is returns a 404. As I
> > > understand, the configuration is right, but I can't see what's wrong.
> > 
> 
> As requested, I've attached the full configuration file.
> 
> > What specific test request do you make?
> 
> GET /foo/ with curl:
> $ curl https://foo.bar.com/foo/
> 

It tries getting the index, which then handled by your php block which
doesn't have the alias set.

Also you have an extra space somewhere in your config.



More information about the nginx mailing list