使用Apache开发PHP问题,不执行PHP
Tofloor
poster avatar
一顾倾城
deepin
2018-03-14 18:51
Author
使用deepin 15的Apache + MySQL + PHP开发小程序,
启动服务器如图:

启动php项目

运行出错,服务器变了niginx???

Reply Favorite View the author
All Replies
avatar
^9星守辰^
Moderator
2018-03-14 21:14
#1
是不是之前装着ngin呢,看一下进程
Reply View the author
avatar
138******09
deepin
2018-03-14 21:55
#2
  1. phpinfo();
  2. ?>
Copy the Code

看一下
Reply View the author
avatar
junmoxiao
deepin
2018-03-14 22:19
#3
curl -I -v 跟一下看看
Reply View the author
avatar
int_max
deepin
2018-03-15 20:42
#4
换nginx吧哈哈哈
Reply View the author
avatar
132******85
deepin
2018-03-15 23:24
#5
apache2 肯定没有起来, 能有apache2的欢迎页面,估计是nginx默认的主目录和apache2的一样了都是 /var/www/html/
一定要用apache的话  先service nginx stop  然后 service apache2 start
如果就用nginx 的话 去 配置文件里配置下 nginx 的server
Reply View the author
avatar
186******51
deepin
2018-03-16 05:14
#6
装php会默认装上apache,还会把apache设为自动启动,但如果同时装了nginx的话会端口冲突启动失败,可以用sudo systemctl disable nginx把nginx服务禁止掉
Reply View the author
avatar
w1096224934
deepin
2018-03-17 11:33
#7
用docker吧,docker能解决大多数问题
Reply View the author
avatar
一顾倾城
deepin
2018-04-19 18:06
#8
w1096224934 : docker 还不会用
Reply View the author