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?
天蓬老师2017-05-16 17:15:54
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