第一步,官网下载Nginx:
Nginx下载地址:http://nginx.org/en/download.html
第二步:解压压缩包,得到文件如图所示:
第三步:双击上图中的nginx.exe,然后在浏览器中输入;localhost得到下图,则nginx安装成功。
第四步,可选操作,配置虚拟主机
server{
listen 80;
server_name www.xuecheng.com; --域名,可在本机修改域名
location / {
alias F:/teach/xcEdu/xcEduUI/xc‐ui‐pc‐static‐portal/;--需要访问的地址
index index.html;
}
}
第五步:https://blog.csdn.net/weixin_44446298/article/details/87630276 本地配置域名。
第六步:在浏览器输入域名,即可访问