【问题标题】:compile apache httpd server with apache2.conf as main configuration file以 apache2.conf 作为主要配置文件编译 apache httpd 服务器
【发布时间】:2018-08-03 01:45:18
【问题描述】:
我的英语很差,谢谢你的耐心!
我编译了apache httpd服务器并正常安装。它可以正常工作。配置文件是/usr/local/apache2/conf/httpd.conf。但是我们知道在ubuntu上安装apache使用:apt-get install apache2,会有主配置文件在/etc/apache2/apache2.conf和其他单独的配置文件。
我的问题是如何从源代码编译 apache httpd 服务器并生成与 apache2.conf 而不是 httpd.conf 相同的配置文件结构?
【问题讨论】:
标签:
ubuntu
apache2
httpd.conf
【解决方案1】:
如果您想模仿 Debian/Ubuntu 布局,您必须遵循这些简单的步骤。
HTTPD 配置带有一个名为 的选项,我在这里引用文档:
--enable-layout=布局
其中 LAYOUT 是您在下载源代码进行编译时获得的文件 config.layout 中定义的布局的名称。
由于该文件中已经定义了“Debian”,您只需调用它:
--enable-layout=Debian
这与其他选项一起根据您的要求更改二进制名称和配置文件:
--with-program-name apache2
应该这样做。
简单地说:
./configure --enable-layout=Debian --with-program-name=apache2
...以及您认为必要的任何其他配置选项。