[Nix-dev] how to successfully install owncloud/nextcloud
Bjørn Forsman
bjorn.forsman at gmail.com
Fri Oct 14 20:21:16 CEST 2016
On 14 October 2016 at 20:06, Stefan Huchler <stefan.huchler at mail.de> wrote:
> Hello Bjorn,
>
> thanks that looks interesting, worked and as easy as I expect it from
> nixos :)
>
> One more thing how difficult would it be to add https?
The most difficult part (IMHO) is getting the certificate : -)
I use something like:
services.lighttpd.extraConfig = ''
# Lighttpd SSL/HTTPS documentation:
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_SSL
$HTTP["host"] == "myserver.example" {
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/certs/myserver.example.pem"
ssl.ca-file = "/etc/lighttpd/certs/1_Intermediate.crt"
}
# Force https scheme for nextcloud
$HTTP["scheme"] == "http" {
$HTTP["url"] =~ "^/nextcloud" {
url.redirect = ("^/.*" => "https://myserver.example$0")
}
}
}
'';
You can get free certificate from startssl.com (that's what I use).
Best regards,
Bjørn Forsman
More information about the nix-dev
mailing list