Forum

Wigwam says no non-fatal errors, but restart hiawatha gives error in hiawatha.conf on MaxUploadSize

René
24 January 2015, 12:30


Hiawatha version: 9.11-1_amd64
Operating System: Debian

Hi Hugo,
Small error about MaxUploadSize usage.
I didn't use this in a VirtualHost part, but just in the generic part.

Regards,
René

rene@debian:/tmp$ whereis wigwam
wigwam: /usr/sbin/wigwam /usr/share/man/man1/wigwam.1.gz
rene@debian:/tmp$ /usr/sbin/wigwam
Using /etc/hiawatha
Reading hiawatha.conf
No non-fatal errors found in the Hiawatha configuration.
rene@debian:/tmp$ sudo service hiawatha restart
Stopping webserver: Hiawatha
Starting webserver: Syntax error in hiawatha.conf on line 79.
error!
rene@debian:/tmp$


hiawatha.conf:
78 : ChallengeClient = 200, httpheader, 60
79 : MaxUploadSize = 15
80 : HTTPAuthToCGI = yes


When I comment out line 79 with #, Hiawatha starts again
Hugo Leisink
24 January 2015, 21:57
The MaxUploadSize should not be placed in a VirtualHost section, but in a Binding section. See the manual page.
René
25 January 2015, 12:41
I see. Now it works fine. Thanks.

I have 8 Binding sections. I think you can improve your configuration, by letting it inherit default settings. And in the specific Binding or VirtualHost Section, then you can overwrite your default settings. This should make it easier to read and configure.

But I have to look up what you introduced with variable settings.

Looking at your example https://www.hiawatha-webserver.org/howto/example_configuration
# BINDING SETTINGS
# A binding is where a client can connect to.
#
Binding {
Port = 80
MaxRequestSize = 128
TimeForRequest = 3,20
}

Binding {
Port = 443
MaxRequestSize = 128
TimeForRequest = 3,20
SSLcertFile = hiawatha.pem
}

You specified MaxRequestSize and TimeForRequest twice with the same values.

# BINDING SETTINGS
# Defaults for each section
BindingDefaults {
MaxRequestSize = 128
TimeForRequest = 3,20
}
# A binding is where a client can connect to.
#
Binding {
Port = 80
}

Binding {
Port = 443
SSLcertFile = hiawatha.pem
}
Binding {
Port = 8080
MaxRequestSize = 64
}
This topic has been closed.