0
votes

My English is poor, thank you for your patience!

I compiled apache httpd server and installed normally. It can work correctly. The configuration file is /usr/local/apache2/conf/httpd.conf. But we known that install apache on ubuntu use: apt-get install apache2, will have the main configuration file in /etc/apache2/apache2.conf and other separate configuration files.

My question is how to compile apache httpd server from source code and generate the configuration files structure same with apache2.conf not the httpd.conf?

1

1 Answers

0
votes

If you want to mimic Debian/Ubuntu layout you have to follow these simple steps.

HTTPD configure comes with an option called , and I'm citing the docs here:

--enable-layout=LAYOUT

Where LAYOUT is the name of a layout defined in the file config.layout you obtain when you download the source code to compile.

Since "Debian" is already defined there in that file, you just invoke it:

--enable-layout=Debian

This along with this other option to change the binary name and config file as you requested:

--with-program-name apache2

should do the trik.

So briefly:

./configure --enable-layout=Debian --with-program-name=apache2 

...and any other options for configure you deem necessary.