@ apache编译配置踩坑记录
背景
需要帮助同事调apche配置问题,拿到同事的apache配置文件,放到自己的机器上部署后发现如下问题
如下是经过了5次编译后得到的编译命令
编译命令: ./configure --prefix=/home/svr/apache --with-included-apr --enable-so --enable-deflate=shared --enable-mods-shared=all --enable-expires=shared --enable-proxy-balancer=shared --enable-rewrite=shared --enable-static-support --enable-proxy-http=shared --enable-proxy=shared --with-mpm=worker --enable-headers=shared --enable-proxy-ajp --enable-cache --enable-disk-cache --enable-mem-cache --enable-proxy-ftp --enable-ssl --enable-proxy --enable-proxy-connect --enable-proxy-http --enable-proxy-scgi && make && make install
如下是遇到的报错和处理
[home@bk conf]$ …/bin/apachectl -t Syntax error on line 47 of /home/svr/apache/conf/httpd.conf: Invalid command ‘Order’, perhaps misspelled or defined by a module not included in the server configuration 原因是,少加了: LoadModule authz_host_module modules/mod_authz_host.so
[home@bk conf]$ …/bin/apachectl -t Syntax error on line 49 of /home/svr/apache/conf/extra/httpd-ssl.conf: Invalid command ‘AddType’, perhaps misspelled or defined by a module not included in the server configuration 原因是,少加了: LoadModule mime_module modules/mod_mime.so
[home@bk apache]$ bin/apachectl -t Syntax error on line 118 of /home/svr/apache/conf/extra/httpd-ssl.conf: Invalid command ‘TransferLog’, perhaps misspelled or defined by a module not included in the server configuration 原因是,少加了: LoadModule log_config_module modules/mod_log_config.so
[home@bk apache]$ bin/apachectl -t Syntax error on line 261 of /home/svr/apache/conf/extra/httpd-ssl.conf: Invalid command ‘BrowserMatch’, perhaps misspelled or defined by a module not included in the server configuration 原因是,少加了: LoadModule setenvif_module modules/mod_setenvif.so
|