Step 2: Requirements

Run script from this archive to install Apache web server and Python Django framework. Django is required for Web UI, monitoring and reporting modules of Web Safety and is run by Apache.


# add python modules
env ASSUME_ALWAYS_YES=YES pkg install -y python py27-sqlite3 py27-ldap py27-pytz py27-openssl py27-django18

# add apache
env ASSUME_ALWAYS_YES=YES pkg install -y apache24 ap24-mod_wsgi4

# add other important modules
env ASSUME_ALWAYS_YES=YES pkg install -y openldap-client sudo ca_root_nss

# autostart apache
grep -e '^\s*apache24_enable\s*=\s*\"YES\"\s*$' /etc/rc.conf
if [ $? -ne 0 ]; then
    echo "apache24_enable=\"YES\"" >> /etc/rc.conf


If you get httpd: apr_sockaddr_info_get() failed for errors after reboot, then it means that Apache was not able to determine fully qualified domain name of the host and will not start. To correct that comment out the line starting with LoadModule unique_id_module in /usr/local/etc/apache24/httpd.conf. Reboot and Apache should now start automatically. In case this does not work, you should probably add the following line to the /etc/hosts file: <your ip> localhost. Please reboot and see that no other errors shown during the startup.

Press Next to continue to Step 3.