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