This document describes setting up Apache with PHP 4 and OpenSSL on Gentoo Linux.

Installation

Adjust the USE flags and emerge the necessary packages. The example server is a dedicated web server and has USE flags set accordingly, these flags should be adjusted to the expected environment. Specificly the reader may want to remove postgres and use mysql, or remove gd, or add odbc, or something.

imperium root# cat /etc/make.conf|grep '^USE'
USE="-* apache2 crypt curl gd memlimit nls pam postgres xml2"
emerge apache mod_php

Creating a self-signed SSL certificate

% openssl req -new > new.cert.csr
% openssl rsa -in privkey.pem -out new.cert.key
% openssl x509 -in new.cert.csr -out new.cert.cert \
  -req -signkey new.cert.key -days 999

cp new.cert.key /etc/apache2/conf/server.key
cp new.cert.cert /etc/apache2/conf/server.crt

See Also

ChangeLog