# Install apache config
cp -rf $(DIR_CONF)/httpd/* /etc/httpd/conf
- ln -sf $(CONFIG_ROOT)/main/hostname.conf /etc/httpd/conf/
+ touch /etc/httpd/conf/hostname.conf
# Create captive logging directory
-mkdir -pv /var/log/httpd/captive
# Generate all required certificates
generate_certificates
+ # Update hostname
+ echo "ServerName ${HOSTNAME}" > /etc/httpd/conf/hostname.conf
+
boot_mesg "Starting Apache daemon..."
/usr/sbin/apachectl -k start
evaluate_retval
findkey(kv, "DOMAINNAME", domainname);
freekeyvalues(kv);
- if (!(file = fopen(CONFIG_ROOT "/main/hostname.conf", "w")))
- {
- sprintf (message, _("Unable to write %s/main/hostname.conf"), CONFIG_ROOT);
- errorbox(message);
- return 0;
- }
- fprintf(file, "ServerName %s.%s\n", hostname,domainname);
- fclose(file);
-
if (!(file = fopen(CONFIG_ROOT "/main/hosts", "r")))
{
errorbox(_("Unable to open main hosts file."));