ma 2 mycube.connector.one: init
This commit is contained in:
parent
5d98f98b8d
commit
b9eae4bf09
28
makefu/2configs/nginx/mycube.connector.one.nix
Normal file
28
makefu/2configs/nginx/mycube.connector.one.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with config.krebs.lib;
|
||||
let
|
||||
hostname = config.krebs.build.host.name;
|
||||
external-ip = head config.krebs.build.host.nets.internet.addrs4;
|
||||
in {
|
||||
services.redis.enable = true;
|
||||
|
||||
krebs.nginx = {
|
||||
enable = mkDefault true;
|
||||
servers = {
|
||||
mybox-connector-one = {
|
||||
listen = [ "${external-ip}:80" ];
|
||||
server-names = [
|
||||
"mycube.connector.one"
|
||||
"mybox.connector.one"
|
||||
];
|
||||
locations = singleton (nameValuePair "/" ''
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://localhost:8001/;
|
||||
'');
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -8,7 +8,7 @@ in {
|
|||
krebs.nginx = {
|
||||
enable = mkDefault true;
|
||||
servers = {
|
||||
omo-share = {
|
||||
update-connector-one = {
|
||||
listen = [ "${external-ip}:80" ];
|
||||
server-names = [
|
||||
"update.connector.one"
|
||||
|
|
Loading…
Reference in a new issue