1 安裝 yum install nginx : 配置文件目錄 /etc/nginx/nginx.confnginx
2 spa
檢測配置 :nginx -tc /etc/nginx/nginx.conf
重啓 nginx -s reload -c /etc/nginx/nginx.conf
3 靜態資源配置,在/usr/local/static/image/ 中咱們放一張圖片1.jpg上去,重啓nginx服務 ,訪問路徑 localhost:80/image/1.jpg
location /image/ {
root /usr/local/
static/;
autoindex on;
}