yum install epel-release -y yum -y install nginx systemctl start nginx.service 访问ip地址
创建虚拟主机根目录 mkdir -p /var/www/juna3066.com/public_index/ vim /var/www/juna3066.site/public_html/index.html 编写 配置nginx vim /etc/nginx/conf.d/virtual.conf server{ listen 80; server_name www.juna3066.site; root /var/www/juna3066.site/public_html/ index index.html } 确认配置是否正确 nginx -t
重启服务 systemctl restart nginx.service
原文:https://www.cnblogs.com/juna3066/p/14106413.html