一.Nginx Locationhtml
二.動靜分離linux
動靜分離就是將nginx須要處理的東西分開放置處理。(參考Nginx反向解析)nginx
113中共享圖片文件vim
[root@localhost ~]# mkdir /images
[root@localhost ~]# vim /etc/exports瀏覽器
[root@localhost ~]# cat /etc/exports
/images 192.168.200.111(ro)測試
[root@localhost ~]# systemctl restart rpcbind
[root@localhost ~]# systemctl restart nfsspa
[root@localhost images]# ls //在images中上傳測試圖片
linux11.jpg3d
111中掛載目錄rest
[root@localhost ~]# mkdir /usr/local/nginx/html/images
[root@localhost ~]# mount 192.168.200.113:/images /usr/local/nginx/html/images
[root@localhost ~]# cd /usr/local/nginx/html/images
[root@localhost images]# ls
linux11.jpghtm
在index.html中引用圖片
用瀏覽器測試
測試成功