Enable Apache HTTPS in FreeBSD
The following procedure activates HTTPS for the Apache web server in FreeBSD.
This secure protocol uses TLS/SSL certificates to encrypt the data transferred between the remote user and the web server. Sensitive information is protected from being captured by malicious actors using sniffing tools along the network route.
==========
1. PREREQUISITES
1.1. Make a self-signed SSL certificate. [ Details ]
2. ACTIVATION
2.1. Log in to "root". Regular users must be part of the "wheel" group in order to do this.
user@host: $ su -
2.2. Open the Apache main configuration file.
root@host: # ee /usr/local/etc/apache24/httpd.conf
2.3. Find and uncomment the following Apache directives.
# BEGIN CODE
# ...
LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so
# Needed by the "SSLSessionCache" directive in httpd-ssl.conf
# ...
LoadModule ssl_module libexec/apache24/mod_ssl.so
# Needed by the "SSLCipherSuite" directive in httpd-ssl.conf
# ...
Include etc/apache24/extra/httpd-ssl.conf
# Secure Sockets Layer configuration file of the HTTP daemon.
# ...
# END CODE
2.4. Restart the server.
root@host: # service apache24 restart
==========
In Debian-based Linux distribution, the process of enabling Apache HTTPS is slightly shorter because a "snake oil" (self-signed) SSL certificate is automatically generated during package installation.
==========
Comments
Post a Comment