5

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?

David Foerster
  • 36,264
  • 56
  • 94
  • 147
Michael
  • 489

4 Answers4

7

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
0

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

MCR
  • 321
0

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
David Foerster
  • 36,264
  • 56
  • 94
  • 147
0

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/
Faron
  • 1,398
  • 10
  • 14