# [Solved] Apache fails after 2.0.59-r5 upgrade & rollback

## cgmd

Hi, all...

My emerge world has upgraded apache to apache-2.0.59-r5.

Now, apache fails to start, with the following error:

```

 * Apache2 has detected a syntax error in your configuration files:

Syntax error on line 242 of /etc/apache2/httpd.conf:

module access_module is built in and can't be loaded
```

What is the best way to resolve this?   :Confused: 

Thanks!

----------

## nixnut

try commenting out line 242 of /etc/apache2/httpd.conf

----------

## cgmd

 *nixnut wrote:*   

> try commenting out line 242 of /etc/apache2/httpd.conf

 

I tried that, only to get: 

```
/etc/init.d/apache2 start

 * Apache2 has detected a syntax error in your configuration files:

Syntax error on line 243 of /etc/apache2/httpd.conf:

module auth_module is built-in and can't be loaded

```

After, then commenting out line 243, I get the following 

```

# /etc/init.d/apache2 start

 * Apache2 has detected a syntax error in your configuration files:

Syntax error on line 244 of /etc/apache2/httpd.conf:

Cannot load /usr/lib/apache2/modules/mod_auth_anon.so into server: /usr/lib/apache2/modules/mod_auth_anon.so: cannot open shared object file: No such file or directory

```

What next?   :Confused: 

----------

## Hu

When you upgraded, was there a new configuration file?  If so, did you merge its changes or just keep your old configuration?

----------

## cgmd

 *Hu wrote:*   

> When you upgraded, was there a new configuration file?  If so, did you merge its changes or just keep your old configuration?

 

The following configs, I upgraded, using dispatch-conf and, I, not thinking, chose u for each:

```

/etc/apache2/vhosts.d/00_default_vhost.conf

/etc/apache2/modules.d/41_mod_ssl.default-vhost.conf

/etc/apache2/httpd.conf
```

I do have backup copies of those original configs...  Simply replacing the new configs with my backups didn't fix things. :Confused: 

----------

## nixnut

Hmm, could be a problem with the init script: https://bugs.gentoo.org/show_bug.cgi?id=190331#c7

No idea what to do about it though. I haven't updated apache here yet and I think I'll wait for a bit.

----------

## cgmd

I'm still struggling with this apache2 problem, after rolling back to www-servers/apache-2.0.58-r2 and rebuilding my original config files that were working for that version.

When I try to load apache2, I get, once again: 

```

# /etc/init.d/apache2 start

 * Apache2 has detected a syntax error in your configuration files:

Syntax error on line 242 of /etc/apache2/httpd.conf:

module access_module is built-in and can't be loaded
```

So, I comment out module access_module, and I then get:

```

# /etc/init.d/apache2 start

 * Apache2 has detected a syntax error in your configuration files:

Syntax error on line 244 of /etc/apache2/httpd.conf:

Cannot load /usr/lib/apache2/modules/mod_auth_anon.so into server: /usr/lib/apache2/modules/mod_auth_anon.so: cannot open shared object file: No such file or directory
```

Next, I look in /usr/lib/apache2/modules/, and the list is, indeed, deficient mod_auth_anon.so:

```

# ls -l /usr/lib/apache2/modules/

total 6006

-rw-r--r-- 1 root root    8504 Sep  1 17:59 httpd.exp

-rwxr-xr-x 1 root root 5770276 Aug 12 21:02 libphp5.so

-rwxr-xr-x 1 root root   22456 Sep  1 18:02 mod_auth_ldap.so

-rwxr-xr-x 1 root root    8208 Aug 12 20:14 mod_authz_svn.so

-rwxr-xr-x 1 root root  110400 Aug 12 20:14 mod_dav_svn.so

-rwxr-xr-x 1 root root   37624 Sep  1 18:02 mod_ldap.so

-rwxr-xr-x 1 root root  159256 Sep  1 18:02 mod_ssl.so

-rwxr-xr-x 1 root root    4624 Sep  1 18:02 mod_suexec.so
```

In fact, there are several modules called by /etc/apache2/httpd.conf, that are not present. Excerpt from httpd.conf:

```

# Authentication Modules

#

# These modules provide authentication and authorization for

# clients. They should not normally be disabled.

#

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

#

# Metadata Modules

#

# These modules provide extra data to clients about

# a file, such as the mime-type or charset.

#

LoadModule charset_lite_module           modules/mod_charset_lite.so

LoadModule env_module                    modules/mod_env.so

LoadModule expires_module                modules/mod_expires.so

LoadModule headers_module                modules/mod_headers.so

LoadModule mime_module                   modules/mod_mime.so

LoadModule negotiation_module            modules/mod_negotiation.so

LoadModule setenvif_module               modules/mod_setenvif.so

#

```

Actually, those missing modules are not located anywhere on my machine...

Where can I go from here to get a functional apache server? I'm open to all suggestions...

Does anyone know a fix??  :Sad: 

Thanks!

----------

## Caleb9

Do you have apache-tools installed? Emerging it solved the problem in my case and I had exactly the same signs.

----------

## cgmd

 *Caleb9 wrote:*   

> Do you have apache-tools installed? Emerging it solved the problem in my case and I had exactly the same signs.

 

Good suggestion! However...

```

 # emerge -av apache-tools

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  N    ] app-admin/apache-tools-2.2.4-r4  USE="ssl" 4,815 kB

[blocks B     ] <www-servers/apache-2.0.59-r5 (is blocking app-admin/apache-tools-2.2.4-r4)

Total: 1 package (1 new, 1 block), Size of downloads: 4,815 kB

!!! Error: The above package list contains packages which cannot be installed

!!!        at the same time on the same system.

```

And...

```

 # equery list apache

[ Searching for package 'apache' in all categories among: ]

 * installed packages

[I--] [  ] www-servers/apache-2.0.58-r2 (2)
```

How is this possible?  :Confused: 

----------

## nixnut

Things got a bit hectic the last days wrt apache. I think you'll need to sync again. the 2.0.59-r5 ebuild was changed so it too depends on apache-tools now.

----------

## cgmd

 *nixnut wrote:*   

> Things got a bit hectic the last days wrt apache. I think you'll need to sync again. the 2.0.59-r5 ebuild was changed so it too depends on apache-tools now.

 

Re-sync finished. Now I get: 

```
# emerge -av apache-tools

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  N    ] app-admin/apache-tools-2.2.4-r4  USE="ssl" 4,815 kB

[blocks B     ] <www-servers/apache-2.2.4 (is blocking app-admin/apache-tools-2.2.4-r4)

Total: 1 package (1 new, 1 block), Size of downloads: 4,815 kB

```

I have never compiled www-servers/apache-2.2.4...

Is it your recommendation that I should persevere  with my unsuccessful attempt to rollback to apache-2.0.58-r2, or should I, once again, attempt to move on to 2.0.59-r5?

[Edit] OK... Different tactic! In frustration, I upgraded to apache-2.2.4-r12:

```
# equery list apache

[ Searching for package 'apache' in all categories among: ]

 * installed packages

[I--] [  ] app-admin/apache-tools-2.2.4-r4 (0)

[I--] [ ~] www-servers/apache-2.2.4-r12 (2)
```

With the single glitch of an incorrect domain name, apache now loads!   :Smile:  :

```

 # /etc/init.d/apache2 start

 * Caching service dependencies ...                                                                                             [ ok ]

 * Starting apache2 ...

apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.1.102 for ServerName              [ ok ] 
```

But... where, in the config files, is the domain name set??

[Edit #2] This too is resolved as being /etc/hosts, by kiksen... from this post!  :Very Happy: 

Thanks!

----------

## HRH_H_Crab

Well im running www-servers/apache-2.2.4-r12 and app-admin/apache-tools-2.2.4-r4.

Still lots of missing module messages here... re-syncing and trying again  :Sad: 

----------

