1.编辑配置文件
1 | sudo vim /etc/nginx/nginx.conf |
在http {}中添加如下
1 | server { |
2.重启nginx
1 | systemctl restart nginx |
3.访问,成功
1 | localhost:80/index.html |
4.访问日志
1 | tail -n 100 /var/log/nginx/access.log |
1.编辑配置文件
1 | sudo vim /etc/nginx/nginx.conf |
在http {}中添加如下
1 | server { |
2.重启nginx
1 | systemctl restart nginx |
3.访问,成功
1 | localhost:80/index.html |
4.访问日志
1 | tail -n 100 /var/log/nginx/access.log |