Apache LogFormat error / module issues

Hello!,

Trying to configure apache on my opensuse11 box here and have run into some issues.

I previously tried installing apache2/php/mysql from source and had some issues getting getting php to compile correclty with all the options I wanted. So, I deleted my installs of apache php mysql and went back and did a fresh install with yast to see how well that would work.

The install goes ok but when trying to save a config in yast-http I get a ‘cannot adjust apache2 service’ error. Trying from the console I get:

apache2ctl start
Syntax error on line 11 of /etc/apache2/mod_log_config.conf:
Invalid command 'LogFormat', perhaps misspelled or defined by a module not included in the #server configuration

Reading through posts here I have gone through my /etc/sysconfig/apache2 to track down errors in the APACHE_MODULES value and subsequently /etc/apache2/sysconfig.d/loadmodule.conf and /etc/apache2/mod/mod_log_format.conf

Everything ‘looks fine’ to me and I have tried a few methods of reinstalling apache itself. Via yast, via zyyper as well as manually removing anything left behind by those methods.

Any ideas on this?

Thanks!

looking at this further it seems like part of the issue i’m having is that the some of the modules listed in the APACHE_MODULES var in /etc/sysconfig/apache2 are not generating LoadModule commands in /etc/apache2/sysconfig.d/loadmodules.conf

looks like some of module files I need in /usr/var/apache2-worker/ are missing? any idea why mod_log_config.so (for example) would not have been installed by yast?

The module is in /usr/lib/apache2/mod_log_config.so (lib64 for 64 bit systems). log_config is part of the standard modules that come with apache.

yeah, that’s where the links in /usr/lib/apache-prefork point to but it doesn’t seem to be there.

fileserver:/usr/lib/apache2 # ls -la
total 3388
drwxr-xr-x   2 root root    4096 Aug 13 14:57 .
drwxr-xr-x 126 root root   69632 Aug 12 16:03 ..
-rwxr-xr-x   1 root root    5968 Nov 23  2008 mod_actions.so
-rwxr-xr-x   1 root root   10124 Nov 23  2008 mod_alias.so
-rwxr-xr-x   1 root root    5908 Nov 23  2008 mod_asis.so
-rwxr-xr-x   1 root root   10096 Nov 23  2008 mod_auth_basic.so
-rwxr-xr-x   1 root root   26824 Nov 23  2008 mod_auth_digest.so
-rwxr-xr-x   1 root root   10100 Nov 23  2008 mod_authn_alias.so
-rwxr-xr-x   1 root root    5968 Nov 23  2008 mod_authn_anon.so
-rwxr-xr-x   1 root root   10064 Nov 23  2008 mod_authn_dbd.so
-rwxr-xr-x   1 root root    5968 Nov 23  2008 mod_authn_dbm.so
-rwxr-xr-x   1 root root    5972 Nov 23  2008 mod_authn_default.so
-rwxr-xr-x   1 root root    6048 Nov 23  2008 mod_authn_file.so
-rwxr-xr-x   1 root root   10096 Nov 23  2008 mod_authz_dbm.so
-rwxr-xr-x   1 root root    5940 Nov 23  2008 mod_authz_default.so
-rwxr-xr-x   1 root root   10216 Nov 23  2008 mod_authz_groupfile.so
-rwxr-xr-x   1 root root   10176 Nov 23  2008 mod_authz_host.so
-rwxr-xr-x   1 root root   10068 Nov 23  2008 mod_authz_owner.so
-rwxr-xr-x   1 root root    5968 Nov 23  2008 mod_authz_user.so
-rwxr-xr-x   1 root root   34976 Nov 23  2008 mod_autoindex.so
-rwxr-xr-x   1 root root    5912 Nov 23  2008 mod_bucketeer.so
-rwxr-xr-x   1 root root    5972 Nov 23  2008 mod_case_filter.so
-rwxr-xr-x   1 root root    5972 Nov 23  2008 mod_case_filter_in.so
-rwxr-xr-x   1 root root   10176 Nov 23  2008 mod_cern_meta.so
-rwxr-xr-x   1 root root   14308 Nov 23  2008 mod_charset_lite.so
-rwxr-xr-x   1 root root   43468 Nov 23  2008 mod_dav_fs.so
-rwxr-xr-x   1 root root   14384 Nov 23  2008 mod_dav_lock.so
-rwxr-xr-x   1 root root   14284 Nov 23  2008 mod_dbd.so
-rwxr-xr-x   1 root root   22560 Nov 23  2008 mod_deflate.so
-rwxr-xr-x   1 root root    5964 Nov 23  2008 mod_dir.so
-rwxr-xr-x   1 root root   18464 Nov 23  2008 mod_disk_cache.so
-rwxr-xr-x   1 root root   10092 Nov 23  2008 mod_dumpio.so
-rwxr-xr-x   1 root root    5964 Nov 23  2008 mod_echo.so
-rwxr-xr-x   1 root root    5964 Nov 23  2008 mod_env.so
-rwxr-xr-x   1 root root   10260 Nov 23  2008 mod_expires.so
-rwxr-xr-x   1 root root   18560 Nov 23  2008 mod_ext_filter.so
-rwxr-xr-x   1 root root   10264 Nov 23  2008 mod_file_cache.so
-rwxr-xr-x   1 root root   14220 Nov 23  2008 mod_filter.so
-rwxr-xr-x   1 root root   14304 Nov 23  2008 mod_imagemap.so
-rwxr-xr-x   1 root root   10100 Nov 23  2008 mod_log_forensic.so
-rwxr-xr-x   1 root root   22816 Nov 23  2008 mod_mem_cache.so
-rwxr-xr-x   1 root root   18428 Nov 23  2008 mod_mime.so
-rwxr-xr-x   1 root root   22896 Nov 23  2008 mod_mime_magic.so
-rwxr-xr-x   1 root root   30852 Nov 23  2008 mod_negotiation.so
-rwxr-xr-x   1 root root    5888 Nov 23  2008 mod_optional_fn_export.so
-rwxr-xr-x   1 root root    5888 Nov 23  2008 mod_optional_fn_import.so
-rwxr-xr-x   1 root root    5892 Nov 23  2008 mod_optional_hook_import.so
-rw-r--r--   1 root root 2474448 Nov 14  2008 mod_php5.so
-rwxr-xr-x   1 root root   35296 Nov 23  2008 mod_proxy_ajp.so
-rwxr-xr-x   1 root root   22728 Nov 23  2008 mod_proxy_balancer.so
-rwxr-xr-x   1 root root   10124 Nov 23  2008 mod_proxy_connect.so
-rwxr-xr-x   1 root root   34952 Nov 23  2008 mod_proxy_ftp.so
-rwxr-xr-x   1 root root   30912 Nov 23  2008 mod_proxy_http.so
-rwxr-xr-x   1 root root   10128 Nov 23  2008 mod_setenvif.so
-rwxr-xr-x   1 root root   10128 Nov 23  2008 mod_speling.so
-rwxr-xr-x   1 root root   10128 Nov 23  2008 mod_substitute.so
-rwxr-xr-x   1 root root    5964 Nov 23  2008 mod_suexec.so
-rwxr-xr-x   1 root root   10304 Nov 23  2008 mod_unique_id.so
-rwxr-xr-x   1 root root   10096 Nov 23  2008 mod_userdir.so
-rwxr-xr-x   1 root root   10208 Nov 23  2008 mod_usertrack.so
-rwxr-xr-x   1 root root   10064 Nov 23  2008 mod_version.so
-rwxr-xr-x   1 root root   10148 Nov 23  2008 mod_vhost_alias.so

Maybe your apache2 RPM didn’t correctly install? What does

rpm -V apache2

output?

Also bear in mind that some modules are incompatible with worker, not sure about log_config though. Is there a reason you are using worker instead of the more common prefork?

I’m away from the box until tomorrow, I’ll post that output when I get to it. I have looked at it when I was working through another thread and it it seemed consistent with what other people had, but I’ll get it tomorrow.

After that post I let yast get mod_php5 and that required prefork so it switched everything over to /usr/lib/apache2-prefork/ which has the same broken links pointing to /usr/lib/.

Anyway, thanks for looking, I’ll try another reinstall on apache tomorrow and see what happens.
What could keep yast from getting those modules?

Error during install maybe?

ok, the output of that was

rpm -V apache2
S.5…T c /etc/apache2/default-server.conf
…T c /etc/apache2/httpd.conf
S.5…T c /etc/sysconfig/SuSEfirewall2.d/services/apache2

YaY! Finally started.

Changed my repositories settings and did a full install from yast again and it finally downloaded all the correct modules files. Thanks for the help!