问题:在终端中输入 curl 127.0.0.1 后,代码中出现404
解决方案:
1、卸载nginx( 需要预先安装 aptitude )
aptitude remove nginx
2、重装nginx
apt-get install nginx
3、查看
nginx -v
4、启动nginx(有多种方式)
service nginx start
5、更改nginx配置
cd /etc/nginx
gedit nginx.conf
http { } 下,修改
6、测试
sudo ufw app list
systemctl status nginx
7、成功!
wget 127.0.0.1
curl 127.0.0.1
最后,在浏览器搜索栏中输入http://127.0.0.1,即可恢复