安装额外的 apache 模块
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1389140/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
installing additional apache modules
提问by David
I need to enable additional modules for apache eg, mod_proxy, mod_proxy-html, and mod_proxy_balancer.
我需要为 apache 启用其他模块,例如 mod_proxy、mod_proxy-html 和 mod_proxy_balancer。
Is there a way for me to do that without recompiling the whole apache?
有没有办法让我在不重新编译整个 apache 的情况下做到这一点?
Thanks
谢谢
回答by pavium
You can list the compiled in modules by executing:
您可以通过执行以下命令列出已编译的模块:
$ apache2 -l
Note: this is NOT /etc/init.d/apache2. If the module you need is not already compiled in, you will need to include it inside the configuration file.
注意:这不是/etc/init.d/apache2。如果您需要的模块尚未编译,则需要将其包含在配置文件中。
See herefor a Debian/Ubuntu description.
有关Debian/Ubuntu 说明,请参见此处。
回答by bua
You need just to copy those modules to some directory on Your system/server, then add a command for appache in configure file.
您只需将这些模块复制到您的系统/服务器上的某个目录,然后在配置文件中为 appache 添加一个命令。
ex:
前任:
LoadModule mod_proxy modules/mod_proxy.so / linux
LoadModule mod_proxy modules/mod_proxy.dll / windows
回答by vpram86
If your apache is built with shared library support, then you could copy these modules from another machine(same OS, same/lower version and preferably same compiler) and place it in modules folder. Then use LoadModule directive to dynamically load it.
如果您的 apache 是使用共享库支持构建的,那么您可以从另一台机器(相同的操作系统、相同/较低版本和最好是相同的编译器)复制这些模块并将其放在模块文件夹中。然后使用 LoadModule 指令动态加载它。
If you dont have the modules, you can download the source and build/install apache in a different directory (using --prefix) with option --enable-mods-shared=most. Copy the required modules to the original apache modules folder, and use LoadModule to load it.
如果您没有这些模块,您可以使用选项--enable-mods-shared=most 下载源代码并在不同的目录中构建/安装apache(使用--prefix)。将需要的模块复制到原来的apache模块文件夹,使用LoadModule加载。

