Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Installing

With Ubuntu installing is very straightforward,

sudo aptitude install apache2

Apache 2.x is now installed.

If you load up your browser and type in the ip address of your server you will see a simple page letting you know Apache is working.

Provide Server Name

Apache is working fine, but during restart you will get the warning message, "apache2: Could not reliably determine the server's fully qualified domain name, using ...".

Most websites have a domain name attached to them. Apache is looking for this on startup. There actually is not much documentation on exactly what is happening here. If you happen to know then please let me know via comments on this page. Based on my reading here is how to resolve the error.

First use the hostname command to determine the name of your system,

hostname # Determine name of your system. In this example this server will return tinman
tinman

Next load the empty /etc/apache/httpd.conf into an editor of your choice,

sudo vi /etc/apache2/httpd.conf

Add to the very top of the httpd.conf file,

ServerName tinman

Apache Server Hardening

Here are some of the basic hardening steps I take today.

As with any security notes, I will write a disclaimer that there are more advanced ways to secure Apache. You can go as far as compiling your own custom version but that's out of scope for now.

Edit /etc/apache2/conf.d/security

set ServerTokens Prod - This turns off all the extra header information sent by Apache. Primarily, it would let a client know what version of Apache is being used. The information could be used to look up vulnerabilities on the particular version of Apache you are running.

set ServerSignatures Off - Removes footer information from default apache pages. For example, page not found.

  • No labels