Apache module installation needed to server WordPress with PHP

So I have removed all my modules all my apache modules and my apache server does not starting now 🙂

$sudo service apache2 restart
* Restarting web server apache2                                         [fail]
* The apache2 configtest failed.
Output of config test was: AH00534: apache2: Configuration error: No MPM loaded. Action ‘configtest’ failed.
The Apache error log may have more information.

Ok so we don’t have MPM loaded then.

So lets load mpm_prefork module

$sudo a2enmod mpm_prefork

$sudo service apache2 start

OK what is know:)

Output of config test was:
AH00526: Syntax error on line 156 of /etc/apache2/apache2.conf:
Invalid command ‘Require’, perhaps misspelled or defined by a module not included in the server configuration
Action ‘configtest’ failed.
The Apache error log may have more information.

Another issue:)

$sudo vim /etc/apache2/apache2.conf (in vim press :156) go!

This tells me:

Require all denied 😉

Oh a quick search in google save my day


So we need another module or we need to remove the config from the configuration 🙂

ods-enabled# a2enmod authz_host

More about this module: http://httpd.apache.org/docs/2.4/mod/mod_authz_host.html

Considering dependency authz_core for authz_host:
Enabling module authz_core.
Enabling module authz_host.
To activate the new configuration, you need to run:
service apache2 restart’

$sudo service apache2 restart

service apache2 restart
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using Set the ‘ServerName’ directive globally to suppress this message
* Restarting web server apache2

Ah yest got sweet Jesus!. It’s up and running.

Now we can also remove this annoying message!

Follow the quide depend on the system. You don’t have to use localname 🙂


OK apache will now work with its minimal configuration.

Next step is to add some php module so we can serve php websites.

Again lots of information:






gets some other default modes added to apache conifuuration

$sudo a2endmod rewrite

$sudo a2endmod dir

$sudo a2endmod alias

$sudo a2endmod env

$sudo a2endmod setenvif etc.

My list of runnig modules

Loaded Modules:
core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_user_module (shared)
dir_module (shared)
env_module (shared)
mpm_prefork_module (shared)
rewrite_module (shared)
setenvif_module (shared)

You can add any of these modes by doing $sudo a2enmod (module_name without world module) eg. rewrite instead of rewrite_module

You can try this if you want or



Simply make sure that these modules are there

a2ensmod ph5 and a2ensmode mpm_prefork

a2enmod deflate – to reduce bandwith

Then you may need to edit your php conf if you have got “Order” issue





Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s