温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

搭建LAMP中安装PHP遇到的故障

发布时间:2020-08-03 15:32:17 来源:网络 阅读:710 作者:boy461205160 栏目:web开发

apache结合php遇到的故障

启动apache时出现错误:

/usr/local/apache2/bin/apachectl -t
AH00526: Syntax error on line 367 of /usr/local/apache2/conf/httpd.conf:
AddType requires at least two arguments, a mime type followed by one or more file extensions

AddType application/x-httpd-php.php  ,启动apache出现 AddType requires at least two arguments, a mime type followed by one or more file extensions。 这是因为在 "AddType application/x-httpd-php.php"中的"php.php" 应该要有一个空格 的"AddType application/x-httpd-php  .php"

重启apachel语法检测正常
[root@centos6 local]# /usr/local/apache2/bin/apachectl -t
Syntax OK

服务器主机名描述警告

[root@centos6 local]# /usr/local/apache2/bin/apachectl -t
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.25.113. Set the 'ServerName' directive globally to suppress this message
Syntax OK
vi /usr/local/apache2/conf/httpd.conf
修改httpd.conf文件:
ServerName localhost:80


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI