1、apache 配置、编译、安装完毕后,启动apache :apachectl start,报错如下:
httpd: Syntax error on line 140 of /usr/local/apache2/conf/httpd.conf: Cannot load
解决办法:/usr/local/apache2/modules/mod_dir.so into server: /usr/local/apache2/modules/mod_dir.so: undefined symbol: apr_array_clear 重新配置、编译与安装apache,在configure的时候,带上选项:--with-included-apr。 重新配置、编译与安装的步骤如下: .cd httpd.2.4.6 .make clean
./configure --prefix=/usr/local/apache --enable-so –enable-mods-shared=most --with-mpm=worker --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --with-included-apr
.make .make install 2、启动apache遇到错误:httpd: Could not reliably determine the server's fully qualified domain name,具体为:
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
问题原因与解决办法:这一般是由于本机DNS设置错误或不想连接外网,所以故意不设置导致成的。解决办法如下:
[root@server conf]# vi httpd.conf
#ServerName www.example.com:80 ServerName localhost:80 参考链接:
http://www.2cto.com/os/201201/117797.html
http://hi.baidu.com/zeldady/item/96f1ae30742006c31a969631
3、源码编译apache报错:
configure: error: Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.
解决办法:
将APR和APR-util源码下载,解压放到httpd-2.4.3/srclib里面,并去除版本号
cp -r apr-1.4.6 httpd-2.4.3/srclib/apr cp -r apr-util-1.4.1 httpd-2.4.3/srclib/apr-util 参考:
http://blog.sina.com.cn/s/blog_a45d5a3a01016ycc.html
(责任编辑:IT) |