# apache-2.4 complains about "User" entry

## toralf

```
n22_uml ~ # /etc/init.d/apache2 start

 * Caching service dependencies ...                                                                     [ ok ]

 * apache2 has detected an error in your setup:

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

Invalid command 'User', perhaps misspelled or defined by a module not included in the server configuration

 * ERROR: apache2 failed to start
```

 :Sad: 

----------

## philly_idle

You need to load

```
LoadModule unixd_module modules/mod_unixd.so

LoadModule access_compat_module modules/mod_access_compat.so
```

to account for the first two error messages. The next one is about SSLMutex not existing anymore, but I'm working on it.

----------

## toralf

A great , with the 2 lines of you now I'm here :

```
n22_uml ~ # /etc/init.d/apache2 start

 * apache2 has detected an error in your setup:

[Sun Apr 01 18:08:30.281297 2012] [core:warn] [pid 992:tid 1078466160] AH00117: Ignoring deprecated use of DefaultType in line 8 of /etc/apache2/modules.d/00_mod_mime.conf.

AH00526: Syntax error on line 54 of /etc/apache2/modules.d/40_mod_ssl.conf:

SSLSessionCache: 'shmcb' session cache not supported (known names: ). Maybe you need to load the appropriate socache module (mod_socache_shmcb?).

 * ERROR: apache2 failed to start

```

----------

## JC99

I'm running into the same problem

----------

## philly_idle

I think I almost figured it out. The problem is that the config files are obviously taken from apache-2.2. That is most visible by the use of SSLMutex, which simply doesn't exist in 2.4 anymore (see below).

You need to add to httpd.conf:

```
LoadModule unixd_module modules/mod_unixd.so

LoadModule access_compat_module modules/mod_access_compat.so
```

Also, I added to following to the <IfDefine SSL> section

```

LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
```

Please note that you need to compile Apache with APACHE2_MODULES="access compat socache_shmcb".

Then in modules.d/40_mod_ssl.conf you need to replace SSLMutex  file:/var/run/ssl_mutex with:

```
Mutex default ssl-cache
```

According to apache documentation, this should work:

```
Mutex file:/var/run/ssl_mutex ssl-cache
```

However, there appears to be a bug of some sort, resulting in an error when using the file: mutex. A similar bug existed some time ago on windows with apache-2.2.

Now, Apache should at least start but complaining about some Internal Server Error.

That's all i know right now, I never really concerned myself with apache that closely. I only figured that out in the last 24h or so.

----------

## toralf

```
mkdir /var/run/ssl_mutex
```

helps

----------

## philly_idle

 *toralf wrote:*   

> 
> 
> ```
> mkdir /var/run/ssl_mutex
> ```
> ...

 

Omg...thx.

I still got an internal server error. Does it work for you?

----------

## toralf

 *philly_idle wrote:*   

> I still got an internal server error. Does it work for you?

 Oh yes, FWIW I used "Mutex default ssl-cache".

----------

## philly_idle

That wasn't the problem. mod_auth{z,n}_core weren't loaded; now it works.

I'm basically building my configuration from scratch now. For those who are interested, i checked out the apache svn:

```
svn checkout http://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x httpd-2.4.x
```

using the examples at docs/conf as reference.

----------

## toralf

Yep, these lines were missing :

```
LoadModule authn_core_module modules/mod_authn_core.so

LoadModule authz_core_module modules/mod_authz_core.so

```

----------

## JC99

It's working, thanks!  :Smile: 

----------

## d-fens

this should go into the ebuild as a notice/default option

----------

## toralf

 *d-fens wrote:*   

> this should go into the ebuild as a notice/default option

 ofc, file a bug for that.

----------

## Wuodan

There is a bug for this:

www-servers/apache 2.4.1-r2 will not start with default conf

Thanks for all your input, my fix there should cover them.

----------

