The web root directory is in root "/phpstudy/www/xxx";
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?
闭关修行中......
Configuration
location /phpstudy/static/ { alias /usr/local/nginx/html/phpstudy/www/static/; }
Use alias to map a virtual directory.
alias
Visit address http://[ip]/phpstudy/static/a.txt
http://[ip]/phpstudy/static/a.txt
Configuration
Use
alias
to map a virtual directory.Visit address
http://[ip]/phpstudy/static/a.txt