The Apache server needs to be rebuilt with the module which interfaces to the Secure Sockets Layer (SSL). SSL allows secure encrypted traffic between Apache and Web browsers.
We need to build the SSL module into Apache. We will take this opportunity to build in some other modules which we may need later and to save us from having to do more Apache builds. By now you should feel comfortable building Apache.
webuser
for this.cd ~/build/httpd-2.0.49
make clean
../configure_apache
to read
as follows. The new lines are highlighted.
./configure --prefix=/usr/local/apache-2.0.49 \ --libexecdir=/webpages/libexec \ --with-mpm=prefork \ --enable-info \ --enable-usertrack \ --enable-ssl \ --enable-dav \ --enable-proxy \ --enable-rewrite \ --enable-so
../configure_apache
make
root
.
cd /webpages/build/httpd-2.0.49
make install
We are going to create a self signed certificate for SSL. This would not be done in practice unless it is to be used in a local environment. For Internet use, a certificate would be obtained from a certificate authority.
webuser
window.cd /webpages/conf
openssl genrsa -des3 -out ca.key 1024
openssl req -new -x509 -days 365 -key ca.key -out
ca.crt
1. Country Name (2 letter code) [XY]:
US
2. State or Province Name (full name) []:
Florida
3. Locality Name (eg, city) []:
Tallahassee
4. Organization Name (eg, company) []:
Apache Anonymous
5. Organizational Unit Name (eg, section) []:
Web Server Team
6. Common Name (eg, FQDN) []:
tribe.web.net
7. Email Address (eg, name@FQDN) []:
webuser@tribe.web.net
webuser
window.<IfDefine SSL> Listen 443 <VirtualHost _default_:443> SSLEngine On SSLCertificateFile /webpages/conf/ca.crt SSLCertificateKeyFile /webpages/conf/ca.key </VirtualHost> </IfDefine>
root
window.testsite -DSSL
http://localhost/info
https://tribe.web.net
Examine Certificate
button.Close
button.Accept this Certificate Permanently
.OK
button.OK
Edit
| Preferences
| Privacy
& Security
| Certificates
| Manage
Certificates
Congratulations! You have successfully set up a secure server!