BUT... it starts without issue when I give the "systemctl start hiawatha.service" command.
"systemctl list-unit-files" tells me that hiawatha.service is enabled
"tail -f syslog | grep hiawatha" and "tail -f hiawatha/system.log" (observed while running "systemctl restart hiawatha.service" respond with nothing useful, aside from system.log informing me that hiawatha stopped and started).
My first inclination is that I have made a configuration error. But I have tried the Binding config in several different ways, and cannot seem to get it to start without issuing a manual command.
***
Server: Ubuntu 16.04 LTS
Hiawatha version: 10.6
When I reboot the server, Hiawatha does not start on its own.
"$ sudo systemctl status hiawatha.service" returns the following output:
● hiawatha.service - Hiawatha webserver
Loaded: loaded (/lib/systemd/system/hiawatha.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2017-07-03 13:12:10 EDT; 50s ago
Process: 3514 ExecStart=/usr/sbin/hiawatha (code=exited, status=1/FAILURE)
Process: 3491 ExecStartPre=/usr/sbin/wigwam -q (code=exited, status=0/SUCCESS)
Jul 03 13:12:10 TempleBaptist systemd[1]: Starting Hiawatha webserver...
Jul 03 13:12:10 TempleBaptist hiawatha[3514]: Error binding 2600:3c02::f03c:91ff:fe7a:ec10.80
Jul 03 13:12:10 TempleBaptist systemd[1]: hiawatha.service: Control process exited, code=exited status=1
Jul 03 13:12:10 TempleBaptist systemd[1]: Failed to start Hiawatha webserver.
Jul 03 13:12:10 TempleBaptist systemd[1]: hiawatha.service: Unit entered failed state.
Jul 03 13:12:10 TempleBaptist systemd[1]: hiawatha.service: Failed with result 'exit-code'.
"# less syslog | grep hiawatha" returns the following output:
Jul 3 13:12:10 TempleBaptist hiawatha[3514]: Error binding 2600:3c02::f03c:91ff:fe7a:ec10.80
Jul 3 13:12:10 TempleBaptist systemd[1]: hiawatha.service: Control process exited, code=exited status=1
Jul 3 13:12:10 TempleBaptist systemd[1]: hiawatha.service: Unit entered failed state.
Jul 3 13:12:10 TempleBaptist systemd[1]: hiawatha.service: Failed with result 'exit-code'.
hiawatha.conf shown below:
# GENERAL SETTINGS
#
#ServerString = Hiawatha
ServerId = www-data
ConnectionsTotal = 1024
#ConnectionsPerIP = 32 #Default = 15
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log
ExploitLogfile = /var/log/hiawatha/exloit.log
ThreadKillRate = 3
#DHsize = 4096 #default 2048, for tls
CacheSize = 64
LogfileMask = deny MyIPv4, deny TrustedIP_1
RequestLimitMask = deny TrustedIP_1
ReconnectDelay = 2
# BINDING SETTINGS
# A binding is where a client can connect to.
#
Binding {
Port = 80
Interface = MyIPv4
TimeForRequest = 5,23
MaxRequestSize = 512
MaxUploadSize = 16
}
#
#Binding {
# Port = 443
# TimeForRequest = 5,23
# MaxRequestSize = 512
# MaxUploadSize = 16
# #TLScertFile = /path/to/file
#}
#
Binding {
Port = 80
Interface = MyIPv6
TimeForRequest = 5,23
MaxRequestSize = 512
MaxUploadSize = 16
}
#
#Binding {
# Port = 443
# Interface = MyIPv6
# TimeForRequest = 5,23
# TLScertFile = /path/to/file
# MaxRequestSize = 512
# MaxUploadSize = 16
#}
# BANNING SETTINGS
# Deny service to clients who misbehave.
#
BanlistMask = deny LOCALHOST, deny TrustedIP_1, deny MyIPv4
RequestLimitMask = deny TrustedIP_1
#
ChallengeClient = 200, httpheader, 60
BanOnGarbage = 15
BanOnMaxPerIP = 5 #Default = 2
BanOnMaxReqSize = 15
BanOnDeniedBody = 15
BanOnFlooding = 30/1:15
KickOnBan = yes
RebanDuringBan = yes
# COMMON GATEWAY INTERFACE (CGI) SETTINGS
# These settings can be used to run CGI applications.
#
#CGIhandler = /usr/bin/perl:pl
CGIhandler = /usr/bin/php7.0:php
#CGIhandler = /usr/bin/python:py
#CGIhandler = /usr/bin/ruby:rb
#CGIhandler = /usr/bin/ssi-cgi:shtml
#CGIextension = cgi
#
FastCGIserver {
FastCGIid = PHP7
ConnectTo = /run/php/php7.0-fpm.sock
Extension = php
}
# URL TOOLKIT
# This URL toolkit rule was made for the wordpress CMS,
# which can be downloaded from https://wordpress.org
#
UrlToolkit {
ToolkitID = wordpress
RequestURI exists Return
Match [^?]*(\?.*)? Rewrite /index.php$1
}
# DIRECTORY SETTINGS
# You can specify some settings per directory.
#
Directory {
DirectoryID = assets
Path = /
Extensions = css, js, png, webp, jpg, pdf, woff, woff2
ExpirePeriod = 2 weeks, public
}
# DEFAULT WEBSITE
# It is wise to use your IP address as the hostname of the default website
# and give it a blank webpage. By doing so, automated webscanners won't find
# your possible vulnerable website.
#
Hostname = 66.228.56.204
WebsiteRoot = /var/www/hiawatha
StartFile = index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log
# VIRTUAL HOSTS
# Use a VirtualHost section for each website you want to host.
#
VirtualHost {
Hostname = www.tbcgwinnet.org, *.tbcgwinnett.org
#RequireTLS = yes
#TLScertFile = /etc/hiawatha/certs/tbcgwinnett.pem
WebsiteRoot = /var/www/templebc/public_html
StartFile = index.php
UseToolkit = wordpress
UseDirectory = assets
AccessLogfile = /var/log/templebc/access.log, monthly
ErrorLogfile = /var/log/templebc/error.log
ShowIndex = no
TimeForCGI = 10
UseFastCGI = PHP7
CustomHeader = Vary: Accept-Encoding
CustomHeader = X-Frame-Options: sameorigin
#PreventXSS = block
RandomHeader = 768
#PreventCSRF = block
#XSS & CSRF Interfere with some plugins while setting up. Enable AFTER plugins are configured the way you want
}