跳转到内容

PHP配置:修订间差异

来自wiki | ww3
SkimrMe留言 | 贡献
无编辑摘要
SkimrMe留言 | 贡献
无编辑摘要
第7行: 第7行:
接下来输入 <code>apt install nginx php-fpm -y</code> 系统会自动帮我们处理好依赖的
接下来输入 <code>apt install nginx php-fpm -y</code> 系统会自动帮我们处理好依赖的


安装好了,我们打开 "/etc/nginx" 文件夹
安装好以后我们就要配置nginx了
<br>
<br>
我个人建议注释掉当前目录下 "sites-enable/default"文件里面的全部内容,这样会比较干净
[https://wiki.ww3.tw/index.php/Nginx配置/ 点击此处跳转nginx配置页面]
 
然后再建立名为 "service" 的文件
<br>
往里面写入
 
  server {
    listen: 80;
    servername: _;
    index index.html index.htm index.nginx-debian.html;
    location \ {
    }
  }
 
接下来再运行<code>systemctl restart nginx</code>
<br>
如果不保险的话还可以执行两遍<code>nginx</code>
 
如果有问题的话,会显示出来的
 
最后,在你的浏览器输入你的服务器ip
<br>
看到了
 
  Welcome to nginx!
  If you see this page, the nginx web server is successfully installed and
  working. Further configuration is required.
  <br>
  For online documentation and support please refer to nginx.org.
  Commercial support is available at nginx.com.
  Thank you for using nginx.
 
恭喜你!!!大功告成!!!


[[Category:php]]
[[Category:php]]
[[Category:记录]]
[[Category:记录]]

2026年8月21日 (五) 13:53的版本

记录从零开始配置PHP环境
目前基于Debian13虚拟机,刚刚安装好的没有图形化界面,执行了命令
apt upgrade -y && apt install vim -y

接下来输入 apt install nginx php-fpm -y 系统会自动帮我们处理好依赖的

安装好以后我们就要配置nginx了
点击此处跳转nginx配置页面