命令:yum -y install httpd-tools
命令:htpasswd -c /usr/local/nginx/passwd.db liu

chown nginx /usr/local/nginx/passwd/db
chmod 777 /usr/local/nginx/passwd.db







命令:echo “192.168.8.200” www.liu.com www.benet.com >> /etc/hosts

命令:mkdir -p /var/www/html/benet
mkdir -p /var/www/html/liu
echo "
www.liu.com
" > /var/www/html/liu/index.html
echo "
www.benet.com
" > /var/www/html/benet/index.html



命令:systemctl restart nginx
第六步 用浏览器进行测试

命令:ifconfig ens33:0 192.168.8.111 netmask 255.255.255.0



命令:nginx -t
命令:systemctl restart nginx





