Getting NGINX to view an alias

Gregory Schultz gschultz at bayoutech.co
Tue Jul 31 07:49:31 UTC 2018


Hi,

I'm new at NGINX and I'm having difficulty in setting up to read an alias.
I'm setting up adminer on NGINX to use an alias to see a file outside of
it's main directory. The file is called latest.php in /usr/share/adminer. I
created a synlink to link adminer.php to latest.php. I'm trying to access
adminer through /admin/adminer.php but returns a 404 when I try to access
the file.

my config file:

server {
listen                  80;
listen                  [::]:80;
include /etc/nginx-rc/conf.d/[site]/main.conf;
location /admin/ {
alias /usr/share/adminer/;
}
}

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20180731/b7a1a19d/attachment.html>


More information about the nginx mailing list