LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 08-30-2012, 06:40 PM   #1
Teleute
Member
 
Registered: Mar 2005
Posts: 62

Rep: Reputation: 16
How to find Apache 2.2. compile-time options?


I need to find out what how an instance of Apache was compiled - not just the loaded modules, but specifically what the default dbm database type was set to be (as per http://httpd.apache.org/docs/2.4/mod/mod_authn_dbm.html, this appears to be set at compile time). Anyone know how I can determine this, and if there's any way to change it short of re-compiling?

Thank you!
 
Old 09-01-2012, 08:15 PM   #2
barghota
Member
 
Registered: Jul 2003
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Debian, FreeBSD
Posts: 94

Rep: Reputation: 38
# apache2ctl -V
Or
# httpd -V

Depends on the distro.
 
1 members found this post helpful.
Old 09-02-2012, 12:30 PM   #3
Teleute
Member
 
Registered: Mar 2005
Posts: 62

Original Poster
Rep: Reputation: 16
Strange - on RHEL 6.2, that was giving me the modules, but no flags. Basically I want to see the entire compile command (or all info to be able to recreate it exactly).
 
Old 09-02-2012, 09:03 PM   #4
kakaka
Member
 
Registered: Sep 2003
Posts: 382

Rep: Reputation: 86
I'm running Apache 2.2.17 and for me, this command:

Code:
httpd2 -V
includes this output:

Code:
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/srv/www"
 -D SUEXEC_BIN="/usr/sbin/suexec2"
 -D DEFAULT_PIDLOG="/var/run/httpd2.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/var/run/accept.lock"
 -D DEFAULT_ERRORLOG="/var/log/apache2/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="/etc/apache2/httpd.conf"
note the V is capitalized, lower case v has a different purpose. apache2ctl -V also works for me.
 
1 members found this post helpful.
Old 09-04-2012, 10:58 AM   #5
Teleute
Member
 
Registered: Mar 2005
Posts: 62

Original Poster
Rep: Reputation: 16
I do get that - is that every bit of info needed to reproduce a configure? The reason I thought it wasn't, is that I have two installs of Apache on the same server, and they're using different default DBM libraries (I can tell by the format of their DBM files). From everything I'm reading, that is set at Apache compile time. I wanted to confirm exactly which version they were both using, but while httpd -V gives me an output like you show above, it doesn't mention DBM for either of them. So I thought that perhaps there were additional flags that didn't show in this output. If not, then I'm incredibly confused...
 
Old 09-04-2012, 03:13 PM   #6
kakaka
Member
 
Registered: Sep 2003
Posts: 382

Rep: Reputation: 86
Based on the title of the post, and the first clause of the first sentence, I thought you mainly had a problem getting compile options for server itself.

You might want to do something like this for each instance of apache:

Code:
egrep -ri '(auth)|(dbm)' apachex_dir  > auth_confx.txt
where apachex_dir is replaced by the main directory where the particular instance of apache can be found, an the x is replaced with either 1 or 2 depending on which instance you are testing.

You might wish to then run the diff comand on the 2 files:

Code:
diff   auth_conf1.txt   auth_conf2.txt
In my case I have once instance on my personal machine, that instance is in /etc/apache2 so I ran:

Code:
egrep -ri '(auth)|(dbm)' /etc/apache2
In your case, with your two instances, the output of the diff command might help us understand what the issue is here.
 
Old 09-04-2012, 03:45 PM   #7
Teleute
Member
 
Registered: Mar 2005
Posts: 62

Original Poster
Rep: Reputation: 16
I thought I was trying to get the compile options of the Apache server (just the DBM library example being one particular one I was trying to find). My understanding was that it was a compile-time option only, not anything in a configuration file. I'll check the above, though, just in case. Thanks!
 
Old 09-04-2012, 04:35 PM   #8
Teleute
Member
 
Registered: Mar 2005
Posts: 62

Original Poster
Rep: Reputation: 16
Looking at the output from above just shows me the modules (which are the same, but the modules alone don't determine the libraries). Here's the info I've been working from, from the Apache 2.2 docs:

"AuthDBMType Directive

Sets the type of database file that is used to store the passwords. The default database type is determined at compile time. The availability of other types of database files also depends on compile-time settings.

It is crucial that whatever program you use to create your password files is configured to use the same type of database."

So this is one example of info I'm trying to find that doesn't seem to be shown in -V, but is still something set at compile time only. If this one exists, then I'm also concerned there might be others.

I hope this helps clarify a bit. :-) Thanks!
 
Old 09-07-2012, 05:09 AM   #9
buro_nahodok
LQ Newbie
 
Registered: Sep 2012
Posts: 1

Rep: Reputation: Disabled
привет всем, такая же проблема

---------- Post added 09-07-12 at 05:10 AM ----------

настройка веб-сервера apache
 
Old 09-07-2012, 12:42 PM   #10
kakaka
Member
 
Registered: Sep 2003
Posts: 382

Rep: Reputation: 86
Quote:
Originally Posted by Teleute View Post
Looking at the output from above just shows me the modules (which are the same, but the modules alone don't determine the libraries). Here's the info I've been working from, from the Apache 2.2 docs:

"AuthDBMType Directive

Sets the type of database file that is used to store the passwords. The default database type is determined at compile time. The availability of other types of database files also depends on compile-time settings.

It is crucial that whatever program you use to create your password files is configured to use the same type of database."

So this is one example of info I'm trying to find that doesn't seem to be shown in -V, but is still something set at compile time only. If this one exists, then I'm also concerned there might be others.

I hope this helps clarify a bit. :-) Thanks!
The output that was requested was the output of the diff command. In general principle, if the situation is so simple that no additional details are needed, beyond what you've provided, then it would seem that the apache installations are so identical, except for the compile options about which you are concerned, that the diff likely shouldn't be showing a list of modules at all.

You posted the link to a portion of the apache configuration info. originally. I'm aware of it. What I'm not aware of are the exact details of your two apache installations, what interpretation you might be placing on the world "default" from the documentation, and exactly how you are going about building apache.

We can think in terms of the "default" type of authentication used by apache, the "default" sort of authentication provided by a directive that has a "default" specific to the directive, etc. I've gotten the impression that you might be placing some interpretation on the use of word "default" in the apache documentation, other then the one that would normally apply to the situation.

Notice from the documentation that "default" is an argument to the directive:

Quote:
Syntax:AuthDBMType default|SDBM|GDBM|NDBM|DB
Default:AuthDBMType default
so rather than specifying a specific type of database:

Code:
AuthDBMType GDBM
using the "default" type of database can be specified:

Code:
AuthDBMType default
You seem to be focusing on manual compile options. Whereas I would normally think in terms of configuring the build environment for apache by other means.

If you won't provide the requested output of the diff, perhaps you could go to the directory where you placed the apache source code, and look at the output of a command sequence such as this:

Code:
./configure --help  |  less
and pay particular attention to the options matching patterns such as *mod*, and *auth*. It might give you some idea of how optional components of an apache build might typically be handled.
 
  


Reply

Tags
apache


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Viewing Apache 2.x compile options (HARD_SERVER_LIMIT) dazdaz Linux - Software 5 05-31-2012 10:55 AM
[SOLVED] Compile time options /proc/config.gz mlcboy01 Linux - Kernel 1 04-23-2010 02:57 AM
CPU time Vs WALL time, Sometimes Walltime lesser than Cputime ? Options anto.anish Programming 2 10-17-2008 06:33 PM
vsftpd rpm compile time options bbolin Linux - Server 1 11-26-2006 10:10 AM
How to Find the Compile Time Options of a RPM Package spurgeonb Red Hat 0 11-13-2004 11:00 PM


All times are GMT -5. The time now is 09:15 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration