Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have many Apache 2.2 Virtual Hosts with same configuration:

<VirtualHost *:80>
    ServerAdmin  webmaster@site.com
    ServerName  site.com
    ServerAlias www.site.com
    DocumentRoot /home/site.com/htdocs/
    ErrorLog     /home/site.com/logs/error.log
    CustomLog    /home/site.com/logs/access.log common
    AssignUserID site.com ftp
    <Directory /home/site.com/htdocs/>
        DirectoryIndex index.html index.htm index.php
        Options Includes FollowSymLinks SymLinksIfOwnerMatch
        AllowOverride All
        Order allow,deny
        Allow from all
   </Directory>
</VirtualHost>

I get errors when trying to run the same configuration on Apache 2.4:

Performing sanity check on apache24 configuration:
AH00526: Syntax error on line 8 of /usr/local/etc/apache24/Includes/site.com.conf:
Invalid command 'AssignUserID', perhaps misspelled or defined by a module not included   in the server configuration

Unfortunately I could not find a way to use my configuration with Apache 2.4. Help solve the problem.

share|improve this question
1  
How did you upgrade? Which modules have you enabled? You obviously need to load the mpm-itk module for that to work. –  faker Jul 11 at 9:12
    
I installed on the new server Apache 2.4 and trying to use VirtualHost configuration files from Apache 2.2. Unfortunately there is no option Apache 2.4 with ITK_MPM, there are options MPM_PREFORK, MPM_WORKER, MPM_EVENT. I use FreeBSD 9.2. –  Allan Sundry Jul 11 at 9:20

2 Answers 2

I'm not familiar with FreeBSD but you'll somehow have to install MPM-ITK for apache 2.4. For instance, in Ubuntu it would be something like sudo apt-get install apache2-mpm-itk

Then, the MPM-ITK module must be enabled in the apache configuration. Uncomment/adding the line below should do the job.

LoadModule mpm_event_module /path/to/apache2/modules/mod_mpm_itk.so

Also, allow from all no longer works in apache2.4; should be Require all granted. The The vhost below should work once you've installed mpm-itk.

<VirtualHost *:80>
    ServerAdmin  webmaster@site.com
    ServerName  site.com
    ServerAlias www.site.com
    DocumentRoot /home/site.com/htdocs/
    ErrorLog     /home/site.com/logs/error.log
    CustomLog    /home/site.com/logs/access.log common
    AssignUserID site.com ftp
    <Directory /home/site.com/htdocs/>
        DirectoryIndex index.html index.htm index.php
        Options Includes FollowSymLinks SymLinksIfOwnerMatch
        AllowOverride All
        Require all granted
   </Directory>
</VirtualHost>
share|improve this answer
up vote 1 down vote accepted

I contacted the maintainer of the port apache24:

You need to load mpm-itk into apache 2.4. There is pending port with
mpm-itk for apache 2.4:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188992

It's waiting for almost three months for some good soul to pick it up :)

... Sun Jul 13 23:21:42 UTC 2014 added a new port:

- new port mod_mpm_itk for apache24

  apache2-mpm-itk (just mpm-itk for short) is an MPM (Multi-Processing Module)
  for the Apache web server. mpm-itk allows you to run each of your vhost
  under a separate uid and gid - in short, the scripts and configuration files
  for one vhost no longer have to be readable for all the other vhosts.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.