1. 缺少某个module
tester@tester_hostname:/etc/init.d$ ./apache2 restart
/usr/sbin/apache2ctl: line 87: ulimit: open files: cannot modify limit: Operation not permitted
Syntax error on line 4 of /etc/apache2/sites-enabled/gerrit.conf:
Invalid command 'ProxyRequests', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
说明目前的apache缺少某个module,解决该问题时有两种方法:
1)首次安装apache,在编译时增加——enable-proxy选项。
如。/configure ——prefix=/usr/local/apachel ——enable-so ——enable-mods-shared=all ——enable-proxy ——enable-cache
2) 增加mod-proxy
对于不同版本或安装方式的的apache这里更改的文件可能不同
以unbuntu12举例,默认apt-get install apache2的路径如下:
产生的启动和停止文件是:/etc/init.d/apache2
库文件存在: /usr/lib/apache/module
修改/etc/apache2/apache2.conf,增加:
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_balancer_module /usr/lib/apache2/modules/mod_proxy_balancer.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
2.
... waiting [Tue Apr 28 09:58:16 2015] [warn] NameVirtualHost *:8090 has no VirtualHosts