Hello,
I've set up Hiawatha 9.15 to serve a simple web-site with some static content, located in /srv/www/main. It shall be accessible via simple http. Let's call the site http://www.site.net
Now, I'd like to put a web-app (ownCloud, root directory is /srv/www/cloud/owncloud) in the URL-path 'cloud', i.e. the ownCloud instance shall only be TSL-accessible via https://www.site.net/cloud (https://www.site.net/ shall return the main page).
My current configuration, which basically works:
UrlToolkit {
ToolkitID = ownCloud
Match ^/cloud/data DenyAccess
}
VirtualHost {
Hostname = www.site.net
WebsiteRoot = /srv/www/main
StartFile = index.html
AccessLogfile = /var/log/hiawatha/main.access.log
ErrorLogfile = /var/log/hiawatha/main.error.log
UseToolkit = ownCloud
Alias = /cloud:/srv/www/cloud/owncloud
WebDAVapp = yes
EnablePathInfo = yes
UseFastCGI = PHP5
RequireSSL = yes
}
This has some issues:
- The RequireSSL = yes entry enforces a http://www.site.net -> https://www.site.net redirect. As I'm using a self-signed certificate, this gives a certificate warning. However, I don't want to bother occasional visitors of the main page with this warning.
- CGI/PHP enabled/accessible on the main page
Basically, I'd like something like the following. Either an improved UrlToolkit:
UrlToolkit {
ToolkitID = ownCloud
Match ^/cloud/data DenyAccess
# NOTE: next lines are not valid in UrlToolkit!
Match ^/cloud/ WebsiteRoot = /srv/www/cloud/owncloud
Match ^/cloud/ AccessLogfile = /var/log/hiawatha/cloud.access.log
Match ^/cloud/ ErrorLogfile = /var/log/hiawatha/cloud.error.log
Match ^/cloud/ WebDAVapp = yes
Match ^/cloud/ EnablePathInfo = yes
Match ^/cloud/ UseFastCGI = PHP5
Match ^/cloud/ RequireSSL = yes
}
VirtualHost {
Hostname = www.site.net
WebsiteRoot = /srv/www/main
StartFile = index.html
AccessLogfile = /var/log/hiawatha/main.access.log
ErrorLogfile = /var/log/hiawatha/main.error.log
UseToolkit = ownCloud
}
...or maybe 2 virtual hosts:
# main
VirtualHost {
Hostname = www.site.net
WebsiteRoot = /srv/www/main
StartFile = index.html
AccessLogfile = /var/log/hiawatha/main.access.log
ErrorLogfile = /var/log/hiawatha/main.error.log
}
# ownCloud
UrlToolkit {
ToolkitID = ownCloud
Match ^/data DenyAccess
}
VirtualHost {
# NOTE: next line is not valid!
Hostname = www.site.net/cloud
WebsiteRoot = /srv/www/cloud/owncloud
StartFile = index.php
AccessLogfile = /var/log/hiawatha/cloud.access.log
ErrorLogfile = /var/log/hiawatha/cloud.error.log
UseToolkit = ownCloud
WebDAVapp = yes
EnablePathInfo = yes
UseFastCGI = PHP5
RequireSSL = yes
}
Any ideas how to handle this?
regards
Lars
BTW: The man-page talks about RequireTLS, however in the config file only RequireSSL works.