LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-09-2007, 04:06 PM   #1
PhilTR
Member
 
Registered: Jun 2004
Location: Birmingham, AL
Distribution: FC6, FC8, FC11
Posts: 102

Rep: Reputation: 17
Apache: httpd fails to start


Hello everyone. Sorry for the 'long' post.

I'm running FeforaCore6 (kernel 2.6.19-1.2895.fc6), which was a relatively uneventful 'upgrade' from FedoraCore4. Apache web server was bundled with my FC4 discs as an 'rpm'. I used the GUI 'Software Updater' provided with FC6 to do all the up-dating, etc. I know, I'm a slave to expediency!

Sometime yesterday (the 8th) I'm no longer able to start 'httpd' service.

I get an intermittent 'interactive mode' boot-up error msg:

"error at line 362, /etc/httpd/conf.d/system-config-httpd.conf: ServerAdmin takes one aruguent, the email address of the server admin".

The text (lines 355-387) posted below starts with the line 'Virtual hosts':

# Virtual hosts
#

# Virtual host Default Virtual Host
<VirtualHost *>
DocumentRoot /var/www/html/
ErrorLog logs/error_log
ServerAdmin



ServerSignature email
TransferLog logs/access_log
DirectoryIndex index.php index.html index.htm index.shtml


SSLEngine off
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
SSLCertificateChainFile /etc/httpd/conf/ssl.crt/ca.crt
SSLCACertificateFile /etc/httpd/conf/ssl.crt/ca-bundle.crt

SSLOptions

TransferLog logs/access_log
ErrorLog logs/error_log
LogLevel debug
HostNameLookups off




</VirtualHost>

I've preserved spacing in case it's important.

As I said, this is an intermitent error msg. Most of the time I just get a red 'fail' msg. I used 'interactive mode' to nail that sucker down as my eyes are bad and my head is worse.

In HTTP Server Configuration GUI, under 'Main, Basic Setup, Server Name'= 'localhost' and Webmaster email address'= 'root@localhost'.

Under the 'Virtual Hosts, Edit Default Settings, logging' the 'transfer' log is supposed to be at 'logs/access_log and 'error log' is supposed to be at 'logs/error_log' neither dir of 'logs' exist as far as I can tell. What I did find was, '/var/log/httpd/access_log. and /var/log/httpd/error_log'

Under HTTP Server Configuation GUI, under the 'Server, lock file'= '/var/lock/httpd.lock' and 'PID file'= '/var/run/httpd.pid' neither of which are not in their respective folders. Whereis and Find show that they're not (no longer) on the system. Now I'm not sure of what is supposed to appear at line '362' instead of 'ServerAdmin'.

A whereis gives me:

[root@localhost ~]# whereis httpd.lock
httpd: /usr/sbin/httpd
/usr/sbin/httpd.worker
/etc/httpd
/usr/lib/httpd
/usr/share/man/man8/httpd.8.gz

As you can see, not a 'default' install in an 'apache2' dir.

As a side note, a Bellsouth tech came by to install a new modem/router combo (Westell, VersaLink, Model: c90-327w30-06, Rev. C). The problem occurred sometime duing the install/set-up process tho I dont'think the installation per-se had anything to do with Apache's failure to start. But he was here from 9:00AM till noon on the 8th.

Undaunted, I looked into the available logs in '/var/log' for hints as to why the 'httpd' dameon was not starting. As mentioned above I found the 'access_logs and error_logs' under '/var/log/httpd/'.

By way of errors (and notices) for Feb 8, 2007 I found:

[Thu Feb 08 07:27:05 2007] [notice] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t
[Thu Feb 08 07:27:05 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Feb 08 07:27:05 2007] [notice] Digest: generating secret for digest authentication ...
[Thu Feb 08 07:27:05 2007] [notice] Digest: done
[Thu Feb 08 07:27:06 2007] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Thu Feb 08 07:27:07 2007] [notice] Apache/2.2.3 (Fedora) configured -- resuming normal operations
[Thu Feb 08 09:02:29 2007] [error] [client 192.168.0.101] File does not exist: /var/www/html/plm/musicbg33.gif, referer: http://192.168.0.100/plm/PriceLess-Music.html
[Thu Feb 08 09:03:42 2007] [error] [client 192.168.0.101] File does not exist: /var/www/html/plm/musicbg33.gif, referer: http://192.168.0.100/plm/plmCatalogMain.html
[Thu Feb 08 09:03:44 2007] [error] [client 192.168.0.101] File does not exist: /var/www/html/plm/musicbg33.gif, referer: http://192.168.0.100/plm/plmContribute.html
[Thu Feb 08 09:03:54 2007] [error] [client 192.168.0.101] File does not exist: /var/www/html/plm/musicbg33.gif, referer: http://192.168.0.100/plm/plmContribute.html
[Thu Feb 08 09:03:55 2007] [error] [client 192.168.0.101] File does not exist: /var/www/html/plm/musicbg33.gif, referer: http://192.168.0.100/plm/plmCatalogMain.html
[Thu Feb 08 09:03:56 2007] [error] [client 192.168.0.101] File does not exist: /var/www/html/plm/musicbg33.gif, referer: http://192.168.0.100/plm/PriceLess-Music.html
[Thu Feb 08 09:38:22 2007] [error] [client 192.168.0.101] File does not exist: /var/www/html/plm/musicbg33.gif, referer: http://192.168.0.100/plm/PriceLess-Music.html
[Thu Feb 08 09:38:28 2007] [error] [client 192.168.0.101] File does not exist: /var/www/html/plm/musicbg33.gif, referer: http://192.168.0.100/plm/plmContribute.html
[Thu Feb 08 09:53:47 2007] [error] [client 192.168.0.101] File does not exist: /var/www/html/plm/musicbg33.gif, referer: http://192.168.0.100/plm/plmContribute.html
[Thu Feb 08 09:53:48 2007] [error] [client 192.168.0.101] File does not exist: /var/www/html/plm/musicbg33.gif, referer: http://192.168.0.100/plm/PriceLess-Music.html
[Thu Feb 08 10:16:25 2007] [notice] caught SIGTERM, shutting down
[Thu Feb 08 10:19:15 2007] [notice] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t
[Thu Feb 08 10:19:15 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Feb 08 10:19:15 2007] [notice] Digest: generating secret for digest authentication ...
[Thu Feb 08 10:19:15 2007] [notice] Digest: done
[Thu Feb 08 10:19:16 2007] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Thu Feb 08 10:19:16 2007] [notice] Apache/2.2.3 (Fedora) configured -- resuming normal operations
[Thu Feb 08 10:32:32 2007] [notice] caught SIGTERM, shutting down
[Thu Feb 08 10:34:31 2007] [notice] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t
[Thu Feb 08 10:34:32 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Feb 08 10:34:32 2007] [notice] Digest: generating secret for digest authentication ...
[Thu Feb 08 10:34:32 2007] [notice] Digest: done
[Thu Feb 08 10:34:33 2007] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Thu Feb 08 10:34:33 2007] [notice] Apache/2.2.3 (Fedora) configured -- resuming normal operations
[Thu Feb 08 10:43:24 2007] [notice] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t
[Thu Feb 08 10:43:24 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Feb 08 10:43:24 2007] [notice] Digest: generating secret for digest authentication ...
[Thu Feb 08 10:43:24 2007] [notice] Digest: done
[Thu Feb 08 10:43:25 2007] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Thu Feb 08 10:43:25 2007] [notice] Apache/2.2.3 (Fedora) configured -- resuming normal operations
[Thu Feb 08 11:09:49 2007] [error] [client 192.168.0.101] File does not exist: /var/www/html/plm/musicbg33.gif, referer: http://192.168.0.100/plm/PriceLess-Music.html
[Thu Feb 08 11:52:52 2007] [notice] caught SIGTERM, shutting down
[Thu Feb 08 11:54:51 2007] [notice] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t
[Thu Feb 08 11:54:51 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Feb 08 11:54:51 2007] [notice] Digest: generating secret for digest authentication ...
[Thu Feb 08 11:54:51 2007] [notice] Digest: done
[Thu Feb 08 11:54:52 2007] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Thu Feb 08 11:54:52 2007] [notice] Apache/2.2.3 (Fedora) configured -- resuming normal operations
[Thu Feb 08 12:13:11 2007] [notice] caught SIGTERM, shutting down
[Thu Feb 08 12:15:22 2007] [notice] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Thu Feb 08 12:15:22 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Feb 08 12:15:22 2007] [notice] Digest: generating secret for digest authentication ...
[Thu Feb 08 12:15:22 2007] [notice] Digest: done
[Thu Feb 08 12:15:23 2007] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Thu Feb 08 12:15:24 2007] [notice] Apache/2.2.3 (Fedora) configured -- resuming normal operations
[Thu Feb 08 12:26:49 2007] [error] [client 192.168.0.101] File does not exist: /var/www/html/pub
[Thu Feb 08 12:29:13 2007] [error] [client 192.168.0.101] File does not exist: /var/www/html/plm/musicbg33.gif, referer: http://192.168.0.100/plm/PriceLess-Music.html
[Thu Feb 08 12:37:51 2007] [error] [client 192.168.0.101] File does not exist: /var/www/html/plm/musicbg33.gif, referer: http://192.168.0.100/plm/PriceLess-Music.html
[Thu Feb 08 12:38:01 2007] [error] [client 192.168.0.101] File does not exist: /var/www/html/plm/musicbg33.gif, referer: http://192.168.0.100/plm/PriceLess-Music.html
[Thu Feb 08 12:52:46 2007] [notice] caught SIGTERM, shutting down

The 'Fev 08 12:52:46 2007' entry is the last in the log file. If there is a hint there, I sure don't recognise it.

Now this problem may be as simple as finding or creating with a text editor an 'httpd.pid' file and a 'httpd.lock' file and inserting each where Apache expects to find them. I dunno. But I'd sure be grateful for some insight. Thanks in advance. phil

Last edited by PhilTR; 02-09-2007 at 04:20 PM.
 
Old 02-09-2007, 04:21 PM   #2
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:
# Virtual host Default Virtual Host
<VirtualHost *>
DocumentRoot /var/www/html/
ErrorLog logs/error_log
ServerAdmin
...
Add your email address to the last line since it cannot be left blank
 
Old 02-09-2007, 05:15 PM   #3
PhilTR
Member
 
Registered: Jun 2004
Location: Birmingham, AL
Distribution: FC6, FC8, FC11
Posts: 102

Original Poster
Rep: Reputation: 17
Apache: httpd fails to start

bathory, would:

"ServerAdmin root@localhost"

get the job done or is some other syntax for that line needed? Please post a snippit of that segment of the file. Thanks. phil

Last edited by PhilTR; 02-09-2007 at 05:17 PM.
 
Old 02-10-2007, 07:24 AM   #4
PhilTR
Member
 
Registered: Jun 2004
Location: Birmingham, AL
Distribution: FC6, FC8, FC11
Posts: 102

Original Poster
Rep: Reputation: 17
Apache: httpd fails to start

I made the following change to '/etc/httpd/conf.d/system-config-httpd.conf/' at line 362 in the 'Virtual hosts' section:

#
# Virtual hosts
#

# Virtual host Default Virtual Host
<VirtualHost *>
DocumentRoot /var/www/html/
ErrorLog logs/error_log
ServerAdmin root@localhost
.
.
.

Needless to say this did not enable 'httpd' services to start.

I also created a file, 'httpd.pid' in '/var/run/' as root using 'gedit' which did not survive the boot-up process. I navigated to '/var/run/' to view the contents of the file only to find that the file was deleted/not there.

I ran:

[root@localhost philtr]# /etc/init.d/httpd configtest
Syntax error on line 384 of /etc/httpd/conf.d/system-config-httpd.conf:
SSLCertificateFile: file '/etc/httpd/conf/ssl.crt/server.crt' does not exist or is empty

I went looking for 'server.cert' and discovered that it was missing.

Also I took a peek into '/var/log/yum.log' to see what pkgs I installed on 020807:

Feb 08 15:40:56 Updated: audit-libs.i386 1.4-1.fc6
Feb 08 15:40:57 Updated: bzip2-libs.i386 1.0.3-5.fc6
Feb 08 15:40:57 Updated: cups-libs.i386 1.2.7-1.8.fc6
Feb 08 15:40:58 Updated: bzip2.i386 1.0.3-5.fc6
Feb 08 15:40:59 Updated: audit-libs-python.i386 1.4-1.fc6
Feb 08 15:41:01 Updated: policycoreutils.i386 1.34.1-4.fc6
Feb 08 15:41:06 Updated: selinux-policy.noarch 2.4.6-35.fc6
Feb 08 15:41:15 Updated: vim-common.i386 7.0.191-2.fc6
Feb 08 15:41:15 Updated: postgresql-libs.i386 8.1.8-1.fc6
Feb 08 15:41:16 Updated: xterm.i386 223-2.fc6
Feb 08 15:41:16 Updated: bzip2-devel.i386 1.0.3-5.fc6
Feb 08 15:41:17 Updated: vim-minimal.i386 7.0.191-2.fc6
Feb 08 15:41:17 Updated: mplayer-fonts.noarch 1.1-4.lvn6
Feb 08 15:41:18 Updated: mpg321.i386 0.2.10.3-3.lvn6
Feb 08 15:41:19 Updated: mplayerplug-in.i386 3.35-1.lvn6
Feb 08 15:41:21 Updated: kino.i386 0.9.5-2.lvn6
Feb 08 15:41:27 Updated: cups.i386 1.2.7-1.8.fc6
Feb 08 15:41:28 Updated: autofs.i386 5.0.1-0.rc3.14
Feb 08 15:41:29 Updated: audit.i386 1.4-1.fc6
Feb 08 15:41:29 Updated: vim-enhanced.i386 7.0.191-2.fc6
Feb 08 15:41:38 Updated: selinux-policy-targeted.noarch 2.4.6-35.fc6

I'm suspecting that my problem might be either
'policycoreutils.i386 1.34.1-4.fc6'
'selinux-policy.noarch 2.4.6-35.fc6'
'selinux-policy-targeted.noarch 2.4.6-35.fc6'

I never had these kinds of problems with FC4. And you know,
I don't feel anymore secure. Anyone with ideas? Thanks. phil

Last edited by PhilTR; 02-10-2007 at 08:44 AM.
 
Old 02-10-2007, 09:05 AM   #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
Adding "ServerAdmin root@localhost" stop the error in your first post, which prevents apache from starting. Now you encounter another one about the missing certificate. Take a look here to see how you can recreate a pair of server certificate/key.
Note that you must not create any httpd.pid file since apache creates it to keep track of it's running process(es). As for the updates I doubt that this is the reason apache stopped working, but you can take a look at the changlogs to see what things they've changed.

Regards
 
Old 02-10-2007, 01:15 PM   #6
PhilTR
Member
 
Registered: Jun 2004
Location: Birmingham, AL
Distribution: FC6, FC8, FC11
Posts: 102

Original Poster
Rep: Reputation: 17
Apache: httpd fails to start

bathory, I followed your link to "Apache 2 RPMs - Installation and Configuration on Fedora Core" but, realized I was in trouble when the author said to "Look inside the directory /usr/share/ssl/ for a file named openssl.cnf" The closest I have to openssl.cnf is:

[root@localhost philtr]# whereis openssl.cnf
openssl:
/usr/bin/openssl
/usr/lib/openssl
/usr/include/openssl
/usr/share/man/man1/openssl.1ssl.gz

The file, opensslconf.h is as follows:

" /* This file is here to prevent a file conflict on multiarch systems. A
* conflict will frequently occur because arch-specific build-time
* configuration options are stored (and used, so they can't just be stripped
* out) in opensslconf.h. The original opensslconf.h has been renamed.
* DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */

#ifdef openssl_opensslconf_multilib_redirection_h
#error "Do not define openssl_opensslconf_multilib_redirection_h!"
#endif
#define openssl_opensslconf_multilib_redirection_h

#if defined(__i386__)
#include "opensslconf-i386.h"
#elif defined(__ia64__)
#include "opensslconf-ia64.h"
#elif defined(__powerpc64__)
#include "opensslconf-ppc64.h"
#elif defined(__powerpc__)
#include "opensslconf-ppc.h"
#elif defined(__s390x__)
#include "opensslconf-s390x.h"
#elif defined(__s390__)
#include "opensslconf-s390.h"
#elif defined(__x86_64__)
#include "opensslconf-x86_64.h"
#else
#error "This openssl-devel package does not work your architecture?"
#endif

#undef openssl_opensslconf_multilib_redirection_h "

I looked for the 'renamed' file and the only other file that's close is the file above, 'opensslconf-i386.h'.

Which is a follows:

" /* Prepended at openssl package build-time. Don't include this file directly,
* use <openssl/opensslconf.h> instead. */

#ifndef openssl_opensslconf_multilib_redirection_h
#error "Don't include this file directly, use <openssl/opensslconf.h> instead!"
#endif

/* opensslconf.h */
/* WARNING: Generated automatically from opensslconf.h.in by Configure. */

/* OpenSSL was configured with the following options: */
#ifndef OPENSSL_DOING_MAKEDEPEND

#ifndef OPENSSL_NO_EC
# define OPENSSL_NO_EC
#endif
#ifndef OPENSSL_NO_ECDH
# define OPENSSL_NO_ECDH
#endif
#ifndef OPENSSL_NO_ECDSA
# define OPENSSL_NO_ECDSA
#endif
#ifndef OPENSSL_NO_GMP
# define OPENSSL_NO_GMP
#endif
#ifndef OPENSSL_NO_IDEA
# define OPENSSL_NO_IDEA
#endif
#ifndef OPENSSL_NO_MDC2
# define OPENSSL_NO_MDC2
#endif
#ifndef OPENSSL_NO_RC5
# define OPENSSL_NO_RC5
#endif

#endif /* OPENSSL_DOING_MAKEDEPEND */
#ifndef OPENSSL_THREADS
# define OPENSSL_THREADS
#endif
#ifndef OPENSSL_NO_ASM
# define OPENSSL_NO_ASM
#endif
#ifndef OPENSSL_NO_STATIC_ENGINE
# define OPENSSL_NO_STATIC_ENGINE
#endif

/* The OPENSSL_NO_* macros are also defined as NO_* if the application
asks for it. This is a transient feature that is provided for those
who haven't had the time to do the appropriate changes in their
applications. */
#ifdef OPENSSL_ALGORITHM_DEFINES
# if defined(OPENSSL_NO_EC) && !defined(NO_EC)
# define NO_EC
# endif
# if defined(OPENSSL_NO_ECDH) && !defined(NO_ECDH)
# define NO_ECDH
# endif
# if defined(OPENSSL_NO_ECDSA) && !defined(NO_ECDSA)
# define NO_ECDSA
# endif
# if defined(OPENSSL_NO_GMP) && !defined(NO_GMP)
# define NO_GMP
# endif
# if defined(OPENSSL_NO_IDEA) && !defined(NO_IDEA)
# define NO_IDEA
# endif
# if defined(OPENSSL_NO_MDC2) && !defined(NO_MDC2)
# define NO_MDC2
# endif
# if defined(OPENSSL_NO_RC5) && !defined(NO_RC5)
# define NO_RC5
# endif
#endif

/* crypto/opensslconf.h.in */

/* Generate 80386 code? */
#define I386_ONLY

#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
#define ENGINESDIR "/usr/lib/openssl/engines"
#define OPENSSLDIR "/etc/pki/tls"
#endif
#endif

#undef OPENSSL_UNISTD
#define OPENSSL_UNISTD <unistd.h>

#undef OPENSSL_EXPORT_VAR_AS_FUNCTION

#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
#define IDEA_INT unsigned int
#endif

#if defined(HEADER_MD2_H) && !defined(MD2_INT)
#define MD2_INT unsigned int
#endif

#if defined(HEADER_RC2_H) && !defined(RC2_INT)
/* I need to put in a mod for the alpha - eay */
#define RC2_INT unsigned int
#endif

#if defined(HEADER_RC4_H)
#if !defined(RC4_INT)
/* using int types make the structure larger but make the code faster
* on most boxes I have tested - up to %20 faster. */
/*
* I don't know what does "most" mean, but declaring "int" is a must on:
* - Intel P6 because partial register stalls are very expensive;
* - elder Alpha because it lacks byte load/store instructions;
*/
#define RC4_INT unsigned int
#endif
#if !defined(RC4_CHUNK)
/*
* This enables code handling data aligned at natural CPU word
* boundary. See crypto/rc4/rc4_enc.c for further details.
*/
#undef RC4_CHUNK
#endif
#endif

#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)
/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
* %20 speed up (longs are 8 bytes, int's are 4). */
#ifndef DES_LONG
#define DES_LONG unsigned long
#endif
#endif

#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
#define CONFIG_HEADER_BN_H
#define BN_LLONG

/* Should we define BN_DIV2W here? */

/* Only one for the following should be defined */
/* The prime number generation stuff may not work when
* EIGHT_BIT but I don't care since I've only used this mode
* for debuging the bignum libraries */
#undef SIXTY_FOUR_BIT_LONG
#undef SIXTY_FOUR_BIT
#define THIRTY_TWO_BIT
#undef SIXTEEN_BIT
#undef EIGHT_BIT
#endif

#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
#define CONFIG_HEADER_RC4_LOCL_H
/* if this is defined data[i] is used instead of *data, this is a %20
* speedup on x86 */
#define RC4_INDEX
#endif

#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
#define CONFIG_HEADER_BF_LOCL_H
#undef BF_PTR
#endif /* HEADER_BF_LOCL_H */

#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
#define CONFIG_HEADER_DES_LOCL_H
#ifndef DES_DEFAULT_OPTIONS
/* the following is tweaked from a config script, that is why it is a
* protected undef/define */
#ifndef DES_PTR
#define DES_PTR
#endif

/* This helps C compiler generate the correct code for multiple functional
* units. It reduces register dependancies at the expense of 2 more
* registers */
#ifndef DES_RISC1
#define DES_RISC1
#endif

#ifndef DES_RISC2
#undef DES_RISC2
#endif

#if defined(DES_RISC1) && defined(DES_RISC2)
YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
#endif

/* Unroll the inner loop, this sometimes helps, sometimes hinders.
* Very mucy CPU dependant */
#ifndef DES_UNROLL
#define DES_UNROLL
#endif

/* These default values were supplied by
* Peter Gutman <pgut001@cs.auckland.ac.nz>
* They are only used if nothing else has been defined */
#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
/* Special defines which change the way the code is built depending on the
CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
even newer MIPS CPU's, but at the moment one size fits all for
optimization options. Older Sparc's work better with only UNROLL, but
there's no way to tell at compile time what it is you're running on */

#if defined( sun ) /* Newer Sparc's */
# define DES_PTR
# define DES_RISC1
# define DES_UNROLL
#elif defined( __ultrix ) /* Older MIPS */
# define DES_PTR
# define DES_RISC2
# define DES_UNROLL
#elif defined( __osf1__ ) /* Alpha */
# define DES_PTR
# define DES_RISC2
#elif defined ( _AIX ) /* RS6000 */
/* Unknown */
#elif defined( __hpux ) /* HP-PA */
/* Unknown */
#elif defined( __aux ) /* 68K */
/* Unknown */
#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
# define DES_UNROLL
#elif defined( __sgi ) /* Newer MIPS */
# define DES_PTR
# define DES_RISC2
# define DES_UNROLL
#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
# define DES_PTR
# define DES_RISC1
# define DES_UNROLL
#endif /* Systems-specific speed defines */
#endif

#endif /* DES_DEFAULT_OPTIONS */
#endif /* HEADER_DES_LOCL_H */ "

'values', countryName_default, stateOrProvinceName_default, localityName_default, etc. are not present or referred to (using an include statement).

For amusement only I ran:

[root@localhost misc]# ./CA -newca
bash: ./CA: No such file or directory

A definite bummer!

The author recommends:

"You will need the following components installed along with your base Apache RPM packages

mod_ssl-2.0.48-1.2
openssl-0.9.7a-23
openssl-devel-0.9.7a-23 "

I have:

mod_ssl-2.2.3-5.i386.rpm
openssl-0.9.8b-8.3.fc6.i686.rpm
openssl-devel-0.9.8b-8.3.fc6.i386.rpm

Sorry this is getting so tedious.

phil

Last edited by PhilTR; 02-10-2007 at 01:32 PM.
 
Old 02-10-2007, 04:56 PM   #7
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
Note that openssl.cnf is not necessary to exist and also you can create it if you want. It's mentioned there as a convenience. The .h files you posted are header files used to compile other other application that require openssl.
Since you have all the packages you need, all you have to do is to start giving the commands to create the certs (i.e. start from "root@localhost root]# cd /usr/share/ssl/misc"). The only thing you must take care is the commonName, where you have to give your servers's F(ully) Q(ualified) D(omain) N(ame).
 
Old 02-11-2007, 08:18 AM   #8
PhilTR
Member
 
Registered: Jun 2004
Location: Birmingham, AL
Distribution: FC6, FC8, FC11
Posts: 102

Original Poster
Rep: Reputation: 17
Apache: httpd fails to start

Quote:
For amusement only I ran:

[root@localhost misc]# ./CA -newca
bash: ./CA: No such file or directory

A definite bummer!
I ran the above from inside the '/usr/share/misc/' dir. I do not have a '/usr/shar/ssl/'dir or an 'ssl' dir on my system. In facr the only bin's close are in '/usr/bin/' and are, 'cert2ldap', 'certfind', and 'certwatch'. I've looked for other bin's that look like the might be used to create certificates but, w/o success.


I've posted the entire 'Virtual Host' section. SSLEngine is 'off ' and so I don't understand why the lines following matter.


" <VirtualHost *>
DocumentRoot /var/www/html/
ErrorLog logs/error_log
ServerAdmin root@localhost



ServerSignature email
TransferLog logs/access_log
DirectoryIndex index.php index.html index.htm index.shtml


SSLEngine off
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
SSLCertificateChainFile /etc/httpd/conf/ssl.crt/ca.crt
SSLCACertificateFile /etc/httpd/conf/ssl.crt/ca-bundle.crt

SSLOptions

TransferLog logs/access_log
ErrorLog logs/error_log
LogLevel debug
HostNameLookups off




</VirtualHost> "

Would commenting them out with hash marks help? phil

Last edited by PhilTR; 02-11-2007 at 08:27 PM.
 
Old 02-12-2007, 01:57 AM   #9
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
I thought that you would like to run apache with ssl, that't why I gave you the link about creating certs in Fedora.
Quote:
Would commenting them out with hash marks help?
It definitively help.
Note also that you can change <VirtualHost *> to <VirtualHost *:80> and that you need a "ServerName host.domain.com" line inside your <VirtualHost>...</VirtualHost>
 
Old 02-12-2007, 11:11 AM   #10
PhilTR
Member
 
Registered: Jun 2004
Location: Birmingham, AL
Distribution: FC6, FC8, FC11
Posts: 102

Original Poster
Rep: Reputation: 17
Apache: httpd fails to start

I commented out, with hash marks, all references to 'VirtualHost' in both '/etc/httpd/conf/httpd.conf ' and '/etc/httpd/conf.d/system-config-httpd.conf '. Doing that took care of my 'syntax error' but, 'httpd' still failed to start which leads me to believe my problem may be with the modules that are loaded or even earlier.

I have a back-up 'http.conf.rpmsave' file which was created during my Feb 8, 2007 update. Both the current and saved module list are:

httpd.conf

LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so


httpd.conf.rpmsave

LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule auth_ldap_module modules/mod_auth_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so

As you can see the module lists are somewhat different with the older config file loading 44 modules and the newer one loading 51. There seem to be a lot of 'auth' modules being loaded. I've not seen 'authn'(5) or 'authz'(7) modules before. The total number of auth modules is up to 14 from 5. <sarcasm> I feel so much more secure</sarcasm>. I have a total of 70 modules in '/usr/lib/httpd/modules'. Older as well as newer. The bin is located in '/usr/sbin/'.

[root@localhost philtr]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:
/bin:/usr/X11R6/bin:/home/philtr/bin


As of the moment, I'd be tickled to death just to get 'httpd' services. I'll add virtulal hosts and such froofroo later. phil

Last edited by PhilTR; 02-12-2007 at 03:19 PM.
 
Old 02-13-2007, 01:54 AM   #11
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
You should comment out only the lines used to define the various ssl related things, not the whole <VirtualHost> part. As for the modules, your distro has them all available and it's up to you to use those you need. Read the apache documentation about these modules and comment out those you don't need.
Anyway what's the error you have now?
 
Old 02-14-2007, 07:31 AM   #12
PhilTR
Member
 
Registered: Jun 2004
Location: Birmingham, AL
Distribution: FC6, FC8, FC11
Posts: 102

Original Poster
Rep: Reputation: 17
I have uncommented everything except the ssl related lines. I only get syntax errors if these four lines are uncommented:

SSLEngine off
# SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
# SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
# SSLCertificateChainFile /etc/httpd/conf/ssl.crt/ca.crt
# SSLCACertificateFile /etc/httpd/conf/ssl.crt/ca-bundle.crt

SSLOptions FakeBasicAuth

Uncommenting 'SSLEngine off ' and ' SSLOptions Fake BasicAuth' do not produce syntax errors. I was under the impression that the 'fake basic auth' was supposed to satisfy the conditions requred by the four commented lines.

Also, there are no error entrys in any of the '/var/log/httpd/*error_logs' since 2-8-07 at 12:52. This suggests to me that the OS in not even able to begin executing the binary.

I'd post both the '/etc/httpd/conf/httpd.conf ' and '/etc/httpd/conf.d/system-config-httpd.conf'files but, I think their sizes prohibit posting and there is not attachment feature that I've been able to find.

Today I'm going to 'cut n paste' the 'httpd.conf.rpmsave'
module section into the module section of 'httpd.conf ', comment-out as appropriate, and experiment with the various modules to see what effect there is. I'll post results tonight. phil

Last edited by PhilTR; 02-14-2007 at 10:27 AM.
 
Old 02-14-2007, 08:01 AM   #13
fooks
Member
 
Registered: Jan 2007
Location: Ukraine
Posts: 47

Rep: Reputation: 15
you do not need to create 'httpd.pid' and 'httpd.lock' files manually!


httpd.pid is created by apache and stores apache main process id number PID.

When you stopping apache, it uses this file to send TERM signal to this process.
 
Old 02-18-2007, 11:58 AM   #14
PhilTR
Member
 
Registered: Jun 2004
Location: Birmingham, AL
Distribution: FC6, FC8, FC11
Posts: 102

Original Poster
Rep: Reputation: 17
Apache: httpd fails to start

Fooks, thanks for your imput. Bathory mentioned it above too.

I tried a few things over the last day or two. First I copied the entire 'mod' list from 'httpd.conf.rpmsave' in to 'httpd.conf ' commenting out the the default 'mod' list with hash marks and then rebooting. I figured I would try the older module list to see what effect. 'httpd' failed to start and the error logs remained silent.

Then I eliminated all modlule lines with 'dual' references in both the default list (httpd.conf) and the rpmsave list (httpd.conf.rpmsave) which left me with:

#'httpd.conf.rpmsave' modules that do not overlap

#LoadModule access_module modules/mod_access.so
#LoadModule auth_module modules/mod_auth.so
#LoadModule auth_anon_module modules/mod_auth_anon.so
#LoadModule auth_dbm_module modules/mod_auth_dbm.so
#LoadModule auth_ldap_module modules/mod_auth_ldap.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule unique_id_module modules/mod_unique_id.so
#LoadModule asis_module modules/mod_asis.so
#LoadModule imap_module modules/mod_imap.so

Default modules (httpd.conf) that are currently commented out with hash marks are:

LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authn_alias_module modules/mod_authn_alias.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
#LoadModule authn_default_module modules/mod_authn_default.so
#LoadModule authz_host_module modules/mod_authz_host.so
#LoadModule authz_user_module modules/mod_authz_user.so
#LoadModule authz_owner_module modules/mod_authz_owner.so
#LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
#LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so

Initially 'mod_auth_basic.so' and 'mod_auth_digest.so' were also commented out and each re-introduced one after another doing a reboot after each was re-introduced. I noted if 'httpd' started and if there were entries in the log files after each boot. 'httpd' faild to start and the log files remained silent.

Could this be a kernel issue? Lord I hope someone can help me. phil

Last edited by PhilTR; 02-18-2007 at 12:00 PM.
 
Old 02-18-2007, 04:14 PM   #15
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
There is no need to reboot your box any time you make a change in httpd.conf. Just use the apache init script:
Code:
service httpd start
or
/etc/init.d/httpd start
Replace start with restart if you want to restart apache to test a new configuration. This way you can also see if there are some errors during apache startup.
Kernel has nothing to do with apache, so use the commands above to (re)start apache, adding modules one at a time, to find out what is the one that causes you the problem.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
httpd fails to start arsham Linux - Software 9 09-04-2007 02:29 AM
httpd fails to start, can't load Perl modual blackdragonblood Linux - Software 8 03-13-2006 02:51 PM
FC4 - httpd fails to start prabhatsoni Linux - Software 5 01-30-2006 06:22 PM
Apache httpd won't start rob19 Linux - Software 6 05-06-2003 10:41 PM
Apache problem - httpd won't start. Iced_Falcon Linux - Networking 3 12-22-2001 04:31 PM

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

All times are GMT -5. The time now is 06:50 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