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

Install Apache Server

With OpenSSL support

If you want to install Apache with OpenSSL support, then you have to install OpenSSL first.

Get OpenSSL, I decided to take the latest version 0.9.8g

Unzip it and change to the directory, followin commands will install openssl into /usr/local/ssl

make test
make install

Create Certificate

For encryption, you need a certificate. You can either generate your own one. or if the server is in the ethz Domain, you can make request for a certificate by the ETH:

To create an own certificate, do the following:

/usr/local/ssl/bin/openssl genrsa -des3 -out <hostname>.key 2048
/usr/local/ssl/bin/openssl req -new -x509 -key <hostname>.key -out <hostname>.crt -days 1095
/usr/local/ssl/bin/openssl rsa -in <hostname>.key -out <hostname>.pem

Be Careful

If you are asked for the Common Name (CN) you have to enter the Full Quallified Domain (FQD) of the server you wanted the certificate for, otherwise the user will always get an error if he access the website!

TPP User

To run the Apache Webserver under its own user, I would suggest to run it under a new User tpp. Like this, we can also restrict the permissions to the tpp data directory to the user tpp. All users who upload data to the server, get access with ssh as user tpp.

adduser -g users tpp


Download the latest Apache2 and unpack it, in my case this was Apache 2.2.6.

./configure --prefix=/usr/local/apache2 --with-ssl=/usr/local/ssl/ --enable-ssl
make install

Start and Stop apache

The following commands start and stop apache2

/usr/local/apache2/bin/apachectl -k start
/usr/local/apache2/bin/apachectl -k stop