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";
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
services.nginx.virtualHosts =
|
||||
let anubisConf = [
|
||||
{
|
||||
addr = "localhost";
|
||||
port = 8888;
|
||||
}
|
||||
];
|
||||
in {
|
||||
# redirection install-party
|
||||
"install-party.crans.fr" = {
|
||||
enableACME = true;
|
||||
|
@ -13,7 +20,6 @@
|
|||
"adopteunmanchot.crans.org"
|
||||
"adopteunpingouin.crans.org"
|
||||
"i-p.crans.fr"
|
||||
"install-party.crans.fr"
|
||||
"adopteunmanchot.crans.fr"
|
||||
"adopteunpingouin.crans.fr"
|
||||
"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
|
||||
"anubis" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:7777";
|
||||
proxyPass = "http://${config.services.anubis.instances."muraille".settings.BIND}";
|
||||
};
|
||||
serverName = "install-party.crans.org";
|
||||
serverAliases = [
|
||||
"mediawiki.crans.org"
|
||||
"wiki.crans.org"
|
||||
];
|
||||
};
|
||||
|
||||
# page install-party
|
||||
# install-party
|
||||
"install-party.crans.org" = {
|
||||
root = "/var/www/install-party.crans.org";
|
||||
listen = [
|
||||
{
|
||||
addr = "localhost";
|
||||
port = 8888;
|
||||
}
|
||||
];
|
||||
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";
|
||||
TARGET = "http://localhost:8888";
|
||||
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