Das Web-Stammverzeichnis befindet sich unter root "/phpstudy/www/xxx";
root "/phpstudy/www/xxx";
Aber das statische Verzeichnis im Programm ist www/static
Das heißt, auf die Domain/www/static/xxxx.jpg kann bei Anfrage zugegriffen werden
Wie verstecke ich www?
闭关修行中......
配置
location /phpstudy/static/ { alias /usr/local/nginx/html/phpstudy/www/static/; }
使用alias映射一个虚拟目录即可。
alias
访问地址 http://[ip]/phpstudy/static/a.txt
http://[ip]/phpstudy/static/a.txt
配置
使用
alias
映射一个虚拟目录即可。访问地址
http://[ip]/phpstudy/static/a.txt