nginx multi-directory configuration issues
PHPz
PHPz 2017-05-16 17:10:10
0
1
405
location = /static {
    root "C:\Users\****\Desktop\cx\www";
}
location = /admin {
    alias "C:\Users\****\Desktop\cx-admin\app";
}
location /{...}

app is a static file directory
I hope that when accessing /admin, it will be equivalent to accessing the app directory
And when accessing admin/, access app/index.html without rewriting
How should I modify it?

PHPz
PHPz

学习是最好的投资!

reply all(1)
左手右手慢动作
location /static {
        alias C:\Users\****\Desktop\cx\www\static/;
        etag         on;
        expires      max;
        access_log off;
    }
    location /admin {
        alias C:\Users\****\Desktop\cx-admin\dist/;
        etag         on;
        expires      max;
    }
    location / {
    ...
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!