Manually install Apache2

If you work with both Ubuntu and CentOS you will realise that if you install Apache2 from the repositories you will end up with 2 very different configuration folders. So i usually install Apache2 manually on new versions of Ubuntu like so:

  • Before you start the installation of Apache2 you may need to install the following libraries if they are missing (in CentOS these libraries are not in the repositories, you have to download them):
sudo apt-get install libapr1-dev libaprutil1-dev
  • The go to and download the latest apache server
  • Extract the folder from the archive and then open the command terminal.
  • In the command terminal navigate to the folder you extracted and run the following commands:
./configure --prefix=/etc/apache --enable-so --enable-mods-shared=all
sudo make install
  • Issue the following command to start the server:
sudo /etc/apache/bin/apachectl restart

Your configuration file will be /etc/apache/conf/httpd.conf. Your logs will be in /etc/apache/logs.


Leave a Reply

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

You are commenting using your 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