Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

This question already has an answer here:

I followed these steps to install Apache 2.4.2 in Ubuntu 12.04, but it seems Apache is not installed, here's what I did (I followed the steps on this site http://www.discusswire.com/apache-2-4-installation-ubuntu/):

sudo apt-get install build-essential
sudo apt-get build-dep apache2
wget http://apache.mirrors.pair.com/httpd/httpd-2.4.2.tar.gz
tar -xzvf httpd-2.4.2.tar.gz && cd httpd-2.4.2
sudo ./configure --prefix=/usr/local/apache2 --enable-mods-shared=all --enable-deflate --enable-proxy --enable-proxy-balancer --enable-proxy-http --with-mpm=prefork
sudo make
sudo make install

when I tried to start by issuing sudo /usr/local/apache2/bin/apachectl start at terminal, I got the following warning:

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message" and when I typed **top** at terminal, the apache is not there. I also tried to go to <CODE>http://localhost/</CODE> or 127.0.0.1 or even 127.0.1.1 it showed "Can't establish connection to server ..." message. 

P.S.: I checked the error log and it showed

[Fri Jul 27 15:49:00.703901 2012] [proxy_balancer:emerg] [pid 20781] AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded??
[Fri Jul 27 15:49:00.704083 2012] [:emerg] [pid 20781] AH00020: Configuration Failed, exiting

What am I missing?

share|improve this question

marked as duplicate by Eric Carvalho, Fabby, mikewhatever, bcbc, KasiyA Feb 19 at 15:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
I'm not sure if this works in 2.4 (it does in 2.2). but the command "httpd -M" will show all of the modules that are loaded in apache. Is mod_slotmem_shm loaded? –  MCR Jul 31 '12 at 3:45
    
See the question below to install the latest version [askubuntu.com/questions/308461/… [1]: askubuntu.com/questions/308461/… –  Tarun Jul 3 '13 at 15:30
1  
Just a remark, but you should never run ./configure and make with sudo, only make install. –  fkraiem Mar 10 '14 at 4:16

4 Answers 4

found this as a bug with httpd and it has not been fixed for long now. The fix was as mentioned in error i.e. you need to uncomment the following line in httpd.conf:

#LoadModule slotmem_shm_module modules/mod_slotmem_shm.so

to

LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
share|improve this answer

I don't believe the ServerName message is relevant. You should be able to clear that up by specifying a servername with the ServerName directive in apache's main config file.

Have you checked apache's error logs? They may show something

share|improve this answer
    
Error log added to original post. Thanks –  Michael Jul 30 '12 at 1:26

Simply add this line in /etc/apache2/apache2.conf

ServerName yourhostname

or just copy this line and paste in your terminal and execute:

sudo sh -c "echo \"ServerName $( hostname )\" >> /etc/apache2/apache2.conf"

it'll do the job for you instead of manually editing your apache2.conf.

Secondly, this line will fix the module issue:

sudo ln -s /etc/apache2/mods-available/mod_slotmem_shm.conf /etc/apache2/mods-enabled/
sudo ln -s /etc/apache2/mods-available/mod_slotmem_shm.load /etc/apache2/mods-enabled/
share|improve this answer

You can use ppa:rhardy/apache24x repository for apache 2.4.2 installation in ubuntu 12.04.

sudo add-apt-repository ppa:rhardy/apache24x
sudo apt-get update
sudo apt-get install apache2
share|improve this answer

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