LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 12-11-2011, 01:32 AM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Apache 2.2.21 missing configure option


I'm trying to build Apache 2.2.21 from source on Ubuntu server 11.04. I have succeeded and run it, but found that suexec is failing because it's trying to open logs where it cannot. So back to the build configuration.

Document http://httpd.apache.org/docs/2.2/suexec.html describes:
Quote:
--with-suexec-logfile=FILE
This defines the filename to which all suEXEC transactions and errors are logged (useful for auditing and debugging purposes). By default the logfile is named "suexec_log" and located in your standard logfile directory (--logfiledir).
There appears to be no such configure option according to document http://httpd.apache.org/docs/2.2/pro...configure.html but I went ahead and tried it, anyway, just in case they overlooked something (has happened before). But it failed to finish the "./configure" step saying the option was not recognized.

So, how can I get the logs to be directed to the proper directory?

They are trying to go to "/opt/logs" (because --prefix=/opt) but I want the logs to go to /var/log/httpd. The access_log and error_log do go there by way of being specified in httpd.conf. However, suexec is not doing this and doesn't get this info from httpd.conf anyway (has to be compiled in for security and/or performance reasons, presumably).
 
Old 12-11-2011, 04:39 AM   #2
gillbertiddio
Member
 
Registered: Sep 2009
Posts: 33

Rep: Reputation: 6
http://httpd.apache.org/docs/2.2/pro...configure.html
try editing "src/Configure" instead - neither is an argument to pass to ./configure but are both options in the Configure file
 
Old 12-11-2011, 07:43 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
There appears to be no such configure option according to document http://httpd.apache.org/docs/2.2/pro...configure.html but I went ahead and tried it, anyway, just in case they overlooked something (has happened before). But it failed to finish the "./configure" step saying the option was not recognized.
Are you sure?
Just for testing, I compiled apache 2.2.21 using the following config.nice, without a hitch
Code:
#! /bin/sh
#
# Created by configure

"./configure" \
"--enable-so" \
"--prefix=/opt/apache" \
"--enable-mods-shared=ssl proxy proxy_http proxy_ftp proxy_connect" \
"--with-mpm=prefork" \
"--enable-vhost-alias" \
"--enable-rewrite" \
"--with-included-apr" \
"--enable-suexec" \
"--with-suexec-logfile=/var/log/httpd/suexec.log" \
"$@"
 
Old 12-11-2011, 03:16 PM   #4
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by bathory View Post
Are you sure?
Just for testing, I compiled apache 2.2.21 using the following config.nice, without a hitch
Code:
#! /bin/sh
#
# Created by configure

"./configure" \
"--enable-so" \
"--prefix=/opt/apache" \
"--enable-mods-shared=ssl proxy proxy_http proxy_ftp proxy_connect" \
"--with-mpm=prefork" \
"--enable-vhost-alias" \
"--enable-rewrite" \
"--with-included-apr" \
"--enable-suexec" \
"--with-suexec-logfile=/var/log/httpd/suexec.log" \
"$@"
So it accepts a full path instead of just a name? They need to update the documentation, then.
 
Old 12-11-2011, 04:23 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
So it accepts a full path instead of just a name? They need to update the documentation, then.
It can accept both.
From apache documentation:
Quote:
--with-suexec-logfile=FILE
This defines the filename to which all suEXEC transactions and errors are logged (useful for auditing and debugging purposes). By default the logfile is named "suexec_log" and located in your standard logfile directory (--logfiledir).
This is half-correct as it states that by default the log file "suexec_log" is created under the logfile directory (if you don't use the --with-suexec-logfile option), which is true.

But if you use "--with-suexec-logfile=FILE" omitting the absolute path to the logfile, then it will be created in the directory from where you are trying to run your scripts. I.e. for a URL like http://host/cgi-bin/foo.cgi, it will be created into the cgi-bin directory, for http://host/whatever/foo.php, that will be in /<docroot>/whatever/ and so on. And you'll end up with various suexec logs in various places!!!
That is why it's better to give the full path to the logfile.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delay in SSH login & find apache server configure option tanveer Linux - Server 3 07-07-2008 06:00 AM
Apache configure option crash_override_me Linux - Software 6 06-20-2008 12:18 PM
[Amarok] Missing an option! FnordPerfect Linux - Desktop 0 01-14-2007 04:33 PM
boot option missing mean fc1 Fedora 8 12-19-2006 04:48 AM
missing GNUChessX Option Alasis Linux - Software 0 08-11-2002 11:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:51 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration