Attempt to serve {learn,blog}.wpcarro.dev

Reading an Nginx tutorial and trying to port the information over to NixOS.
This commit is contained in:
William Carroll 2020-03-07 15:08:11 +00:00
parent 431b4980e4
commit 5ba3f2b572

View file

@ -115,7 +115,7 @@ in {
# Provision SSL certificates to support HTTPS connections.
security.acme.acceptTerms = true;
security.acme.certs."wpcarro.dev".email = "wpcarro@gmail.com";
security.acme.email = "wpcarro@gmail.com";
services.nginx = {
enable = true;
@ -141,15 +141,17 @@ in {
access_log syslog:server=unix:/dev/log json_combined;
'';
virtualHosts.blog = {
serverName = "blog.wpcarro.dev";
useACMEHost = "wpcarro.dev";
virtualHosts = {
"learn.wpcarro.dev" = {
addSSL = true;
extraConfig = ''
location / {
proxy_pass http://localhost:80
}
'';
enableACME = true;
root = "/var/www/learn";
};
"blog.wpcarro.dev" = {
addSSL = true;
enableACME = true;
root = "/var/www/blog";
};
};
};