How to hide a folder in nginx?
阿神
阿神 2017-05-16 17:13:54
0
1
382

The web root directory is in root "/phpstudy/www/xxx";

But the static directory in the program is www/static

That is to say, domain/www/static/xxxx.jpg must be accessed when requesting

How to hide www?

阿神
阿神

闭关修行中......

reply all(1)
Peter_Zhu

Configuration

location /phpstudy/static/ {
    alias /usr/local/nginx/html/phpstudy/www/static/;
}       

Use alias to map a virtual directory.

Visit address http://[ip]/phpstudy/static/a.txt

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!