# 创建文件并上传图片zhf-guli.png
mkdir /usr/local/pic -p
# 配置nginx的 server -> location -> root 图片路径
vi /usr/local/nginx/conf/nginx.conf
#user nobody
..........
location / {
# /zhf-guli.png”会匹配到”/”uri, 找到root为/usr/local/pic
root /usr/local/pic;
index index.html index.htm;
}
# 重新加载
cd /usr/local/nginx/sbin
./nginx -s reload
# 测试
http://192.168.5.11/zhf-guli.png