使用service httpd start 启动Apache时出现下列问题。请问该怎么解决?急求。

2025-03-09 11:29:26
推荐回答(3个)
回答(1):

Syntax error on line 137 of /etc/httpd/conf.d/system-config-httpd.conf。修改下配置文件的137行。

其他:

service httpd restart   出现 httpd:unrecognized service 错误


vi /etc/rc.local #在/etc/rc.d/rc.local中增加启动apache的命令


添加:


/usr/local/apache2/bin/apachectl start


或者               


#将apache注册为系统服务


# cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd


#chmod 700 /etc/rc.d/init.d/httpd


#vi /etc/rc.d/init.d/httpd


在第三行后增加


#Comments to support chkconfig on RedHat Linux


#chkconfig: 2345 90 90


#description:http server

回答(2):

去httpd.conf文件里面看 对应的错误行已经给你了 看下是不是自己哪里写错了 不行就注释

回答(3):

Syntax error on line 137 of /etc/httpd/conf.d/system-config-httpd.conf
检查下配置文件的137行。