码迷,mamicode.com
首页 > Web开发 > 详细

启动http服务,遇到的两个错误

时间:2014-10-20 17:35:26      阅读:218      评论:0      收藏:0      [点我收藏+]

标签:https linux

启动http服务,遇到的错误。


1、没有关闭SELINUX引起的。

[root@localhost etc]# /usr/local/apache2/bin/apachectl start

httpd: Syntax error on line 99 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/mysql/lib/libmysqlclient.so.16: cannot restore segment prot after reloc: Permission denied


解决:setenforce 0

[root@localhost etc]# setenforce 0

[root@localhost etc]# getenforce

Permissive



2、没有在/etc/httpd/conf/httpd.conf 中设定ServerName 

[root@localhost etc]# /usr/local/apache2/bin/apachectl start

httpd: apr_sockaddr_info_get() failed for tongyl

httpd: Could not reliably determine the server‘s fully qualified domain name, using 127.0.0.1 for ServerName


解决:

[root@localhost etc]# vi /usr/local/apache2/conf/httpd.conf

找到#ServerName www.example.com:80   把#去掉,再重启apache即可没事了。


结果:

[root@localhost etc]# /usr/local/apache2/bin/apachectl start

httpd (pid 16288) already running


本文出自 “学习” 博客,请务必保留此出处http://tyl00.blog.51cto.com/6576378/1565928

启动http服务,遇到的两个错误

标签:https linux

原文地址:http://tyl00.blog.51cto.com/6576378/1565928

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!