nginx alias和root
nginx 目录:
[root@zz conf]# ls -ltr /root/www/backoffice/
total 4
-rwxrwxrwx 1 755 root 18 Dec 29 22:20 index.html
server {
listen 8080;
server_name localhost;
#charset koi8-r;
access_log logs/host.access.log main;
location /backoffice {
root /root/www;
index index.html index.htm;
}
[root@zz sbin]# curl http://192.168.137.200:8080/backoffice/
aaaaaaaa
bbbbbbbb
----------------------------------------------------------------------
location / {
alias /root/www/;
index index.html index.htm;
}
[root@zz sbin]# curl http://192.168.137.200:8080/backoffice/
aaaaaaaa
bbbbbbbb
[root@zz sbin]# ls -ltr /root/www/backoffice/
total 4
-rwxrwxrwx 1 755 root 18 Dec 29 22:20 index.html
[root@zz sbin]#