Getting NGINX to view an alias

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


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list