Skip to content

Instantly share code, notes, and snippets.

@chris-martin
Created February 9, 2018 17:06
Show Gist options
  • Save chris-martin/e409df63e2d6f2c57a77078c63ae2cc5 to your computer and use it in GitHub Desktop.
Save chris-martin/e409df63e2d6f2c57a77078c63ae2cc5 to your computer and use it in GitHub Desktop.
{
services.nginx = {
enable = true;
appendHttpConfig = ''
types {
text/html html;
text/css css;
text/xml xml rss;
image/gif gif;
image/jpeg jpeg jpg;
image/png png;
image/x-icon ico;
image/svg+xml svg;
application/x-javascript js;
}
server {
server_name www.chris-martin.org;
listen 80;
return 301 https://chris-martin.org$request_uri;
}
'';
virtualHosts = {
"chris-martin.org" = {
forceSSL = true;
enableACME = true;
locations."/" = {
root = "/home/web-deploy/chris-martin.org";
index = "index.html";
extraConfig = ''
default_type text/html;
'';
};
};
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment