Install Apache httpd on FreeBSD

Download the Apache httpd-2.2.16 Source from this site.


./configure --prefix=/usr/local/httpd --with-z=/usr --with-ssl=/usr --enable-ssl --enable-rewrite=shared --disable-userdir --enable-vhost-alias=shared --enable-dir=shared --enable-http --enable-static-ab --enable-authn-dbd=shared --datadir=/home/www --with-included-apr --enable-autoindex=shared --disable-include --enable-deflate=shared --enable-info=shared --enable-log-config --with-mpm=worker

Using the worker MPM everyting that you install for apache has to be thread safe.
–enable-info and –enable-autoindex has to be set to –disable-info and –disable-autoindex in a production environment.

When I compile / configure PHP and want to get it running with the worker MPM, you have to –enable-experimental-zts Zend Thread Safety libraries.

How to create a Certificate with openssl:
Choose here a strong password:
# openssl genrsa -des3 -out server.key 1024
Now we make the Certificate Signing Request (CSR) from generated key:
In the section “Common Name” enter here your Fully Qualified Domain Name (FQDN), like www.example456676.net
# openssl req -new -key server.key -out server.csr
The certificate is ready to be signed. We self-sign now the certificate, but you could pay money and have it signed by Verisign or Thawte.
# openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
For apache2 we need the correct chmod
# chmod 0400 server.*

Disable password at startup
openssl rsa -in server.key -out server.key.nopass

TBC

Advertisement
Explore posts in the same categories: Moonshine

Leave a Reply

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

WordPress.com Logo

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


Follow

Get every new post delivered to your Inbox.