mirror of https://gitlab.crans.org/nounous/nixos
Ajout de wiki et mediawiki
parent
6e9de7cab7
commit
549dc069f6
|
@ -1,9 +1,16 @@
|
||||||
{ ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
users.users."nginx".home = "/var/lib/nginx";
|
users.users."nginx".home = "/var/lib/nginx";
|
||||||
|
|
||||||
services.nginx.virtualHosts = {
|
services.nginx.virtualHosts =
|
||||||
|
let anubisConf = [
|
||||||
|
{
|
||||||
|
addr = "localhost";
|
||||||
|
port = 8888;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
in {
|
||||||
# redirection install-party
|
# redirection install-party
|
||||||
"install-party.crans.fr" = {
|
"install-party.crans.fr" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
@ -13,7 +20,6 @@
|
||||||
"adopteunmanchot.crans.org"
|
"adopteunmanchot.crans.org"
|
||||||
"adopteunpingouin.crans.org"
|
"adopteunpingouin.crans.org"
|
||||||
"i-p.crans.fr"
|
"i-p.crans.fr"
|
||||||
"install-party.crans.fr"
|
|
||||||
"adopteunmanchot.crans.fr"
|
"adopteunmanchot.crans.fr"
|
||||||
"adopteunpingouin.crans.fr"
|
"adopteunpingouin.crans.fr"
|
||||||
"i-p.crans.eu"
|
"i-p.crans.eu"
|
||||||
|
@ -26,25 +32,66 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# redirection mediawiki
|
||||||
|
"mediawiki.crans.fr" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
serverAliases = [
|
||||||
|
"mediakiwi.crans.org"
|
||||||
|
"mediakiwi.crans.fr"
|
||||||
|
"mediakiwi.crans.eu"
|
||||||
|
"mediawiki.crans.eu"
|
||||||
|
];
|
||||||
|
extraConfig = ''
|
||||||
|
return 301 https://mediawiki.crans.org$request_uri;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# redirection wiki
|
||||||
|
"wiki.crans.fr" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
serverAliases = [
|
||||||
|
"wikipedia.crans.org"
|
||||||
|
"wikipedia.crans.fr"
|
||||||
|
"wikipedia.crans.eu"
|
||||||
|
"wiki.crans.eu"
|
||||||
|
];
|
||||||
|
extraConfig = ''
|
||||||
|
return 301 https://wiki.crans.org$request_uri;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
# redirection anubis
|
# redirection anubis
|
||||||
"anubis" = {
|
"anubis" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:7777";
|
proxyPass = "http://${config.services.anubis.instances."muraille".settings.BIND}";
|
||||||
};
|
};
|
||||||
serverName = "install-party.crans.org";
|
serverName = "install-party.crans.org";
|
||||||
};
|
serverAliases = [
|
||||||
|
"mediawiki.crans.org"
|
||||||
# page install-party
|
"wiki.crans.org"
|
||||||
"install-party.crans.org" = {
|
|
||||||
root = "/var/www/install-party.crans.org";
|
|
||||||
listen = [
|
|
||||||
{
|
|
||||||
addr = "localhost";
|
|
||||||
port = 8888;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# install-party
|
||||||
|
"install-party.crans.org" = {
|
||||||
|
root = "/var/www/install-party.crans.org";
|
||||||
|
listen = anubisConf;
|
||||||
|
};
|
||||||
|
|
||||||
|
# mediawiki
|
||||||
|
"mediawiki.crans.org" = {
|
||||||
|
locations."/".proxyPass = "http://172.16.10.144";
|
||||||
|
listen = anubisConf;
|
||||||
|
};
|
||||||
|
|
||||||
|
# wiki
|
||||||
|
"wiki.crans.org" = {
|
||||||
|
locations."/".proxyPass = "http://172.16.10.161";
|
||||||
|
listen = anubisConf;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
BIND = "127.0.0.1:7777";
|
BIND = "127.0.0.1:7777";
|
||||||
TARGET = "http://localhost:8888";
|
TARGET = "http://localhost:8888";
|
||||||
COOKIE_DOMAIN = "crans.org";
|
COOKIE_DOMAIN = "crans.org";
|
||||||
REDIRECT_DOMAINS = "install-party.crans.org";
|
REDIRECT_DOMAINS = "install-party.crans.org,mediawiki.crans.org,wiki.crans.org";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue