Forum

New Directory config in Hiawatha v10

Andrew
26 November 2015, 00:02
Hi there,

I've just upgraded to Hiawatha v10 and have run into a bit of a challenge with the new "Directory" config. In v9.15 I had the following:

VirtualHost {
...
WebsiteRoot = /var/www
Alias = /nagios3:/usr/share/nagios3/htdocs
Alias = /nagios3/cgi-bin:/usr/lib/cgi-bin/nagios3
...
}

Directory {
Path = /usr/share/nagios3/htdocs
PasswordFile = basic:/etc/nagios3/htpasswd.users
}

Directory {
Path = /usr/lib/cgi-bin/nagios3
PasswordFile = basic:/etc/nagios3/htpasswd.users
}


However with v10 the "Path" stanza is now relative to the website root, so I'm not sure how to reference directories outside of the root (I tried adding the "Alias" path instead, eg
 Path = /nagios3 
, but that doesn't seem to work either).

What's the best way to get around this? I could symlink /usr/lib/cgi-bin/nagios3 to /usr/share/nagios3/htdocs, then symlink that directory to /var/www/nagios3 but that doesn't seem like an elegant solution

Thanks in advance!

Cheers,
Andrew
Hugo Leisink
27 November 2015, 08:13
Hi Andrew,

Your new configuration should now be
VirtualHost {
...
WebsiteRoot = /var/www
Alias = /nagios3:/usr/share/nagios3/htdocs
Alias = /nagios3/cgi-bin:/usr/lib/cgi-bin/nagios3
UseDirectory = htdocs,cgibin
...
}

Directory {
DirectoryID = htdocs
Path = /nagios3
PasswordFile = basic:/etc/nagios3/htpasswd.users
}

Directory {
DirectoryID = cgibin
Path = /nagios3/cgi-bin
PasswordFile = basic:/etc/nagios3/htpasswd.users
}


I realize now that the path /nagios3/cgi-bin also matches /nagios3. If this one doesn't work, try swapping the order of the directory sections.
Andrew
27 November 2015, 21:04
Thank you Hugo, it's working now with that configuration!

Cheers,
Andrew
This topic has been closed.