PHP配置
外观
记录从零开始配置PHP环境
目前基于Debian13虚拟机,刚刚安装好的没有图形化界面,执行了命令
apt upgrade -y && apt install vim -y
接下来输入 apt install nginx php-fpm -y 系统会自动帮我们处理好依赖的
安装好了,我们打开 "/etc/nginx" 文件夹
我个人建议注释掉当前目录下 "sites-enable/default"文件里面的全部内容,这样会比较干净
然后再建立名为 "service" 的文件
往里面写入
server {
listen: 80;
servername: _;
index index.html index.htm index.nginx-debian.html;
location \ {
}
}
接下来再运行systemctl restart nginx
如果不保险的话还可以执行两遍nginx
如果有问题的话,会显示出来的
最后,在你的浏览器输入你的服务器ip
看到了
Welcome to nginx! If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
For online documentation and support please refer to nginx.org. Commercial support is available at nginx.com. Thank you for using nginx.
恭喜你!!!大功告成!!!