apache結(jié)合php遇到的故障
創(chuàng)新互聯(lián)堅(jiān)持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時(shí)代的宜陽(yáng)網(wǎng)站設(shè)計(jì)、移動(dòng)媒體設(shè)計(jì)的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!
啟動(dòng)apache時(shí)出現(xiàn)錯(cuò)誤:
/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 ,啟動(dòng)apache出現(xiàn) AddType requires at least two arguments, a mime type followed by one or more file extensions。 這是因?yàn)樵?"AddType application/x-httpd-php.php"中的"php.php" 應(yīng)該要有一個(gè)空格 的"AddType application/x-httpd-php .php"
重啟apachel語(yǔ)法檢測(cè)正常 [root@centos6 local]# /usr/local/apache2/bin/apachectl -t Syntax OK
報(bào)服務(wù)器主機(jī)名描述警告
[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