Compare commits

..

1 Commits

Author SHA1 Message Date
Oystein Kristoffer Tveit 43ee97c502 WIP: bekkalokk: init mediawiki
Eval nix flake / evals (push) Failing after 1m47s Details
Co-authored-by: Jørn Åne <yorinad@pvv.ntnu.no>
2024-03-29 03:32:24 +01:00
3 changed files with 6 additions and 9 deletions

View File

@ -75,20 +75,17 @@ in
services.nginx.virtualHosts."idp2.pvv.ntnu.no" = { services.nginx.virtualHosts."idp2.pvv.ntnu.no" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
root = "${package}/share/php/simplesamlphp/public"; root = "${package}/share/php/simplesamlphp";
locations = { locations = {
"/".index = "index.php"; "/".index = "index.php";
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
"~ /(.+\\.php)" = { "~ /(.+\\.php)" = {
extraConfig = '' extraConfig = ''
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_pass unix:${config.services.phpfpm.pools.idp.socket}; fastcgi_pass unix:${config.services.phpfpm.pools.idp.socket};
include ${pkgs.nginx}/conf/fastcgi_params; include ${pkgs.nginx}/conf/fastcgi_params;
include ${pkgs.nginx}/conf/fastcgi.conf; include ${pkgs.nginx}/conf/fastcgi.conf;
fastcgi_param SCRIPT_FILENAME ${package}/share/php/simplesamlphp/public/$request_filename;
fastcgi_param SCRIPT_NAME $request_filename;
''; '';
}; };
}; };

View File

@ -17,7 +17,7 @@
--replace '$SAML_COOKIE_SECURE' 'true' \ --replace '$SAML_COOKIE_SECURE' 'true' \
--replace '$SAML_COOKIE_SALT' '"asdfasdfasjdf"' \ --replace '$SAML_COOKIE_SALT' '"asdfasdfasjdf"' \
--replace '$SAML_ADMIN_PASSWORD' '"asdfasdfasdf"' \ --replace '$SAML_ADMIN_PASSWORD' '"asdfasdfasdf"' \
--replace '$SAML_TRUSTED_DOMAINS' 'array( "wiki2.pvv.ntnu.no" )' --replace '$SAML_TRUSTED_DOMAINS' 'array( "bekkalokk.pvv.ntnu.no" )'
''; '';
}; };
in { in {
@ -80,7 +80,7 @@ in {
}; };
extraConfig = '' extraConfig = ''
$wgServer = "https://wiki2.pvv.ntnu.no"; $wgServer = "https://bekkalokk.pvv.ntnu.no";
$wgLocaltimezone = "Europe/Oslo"; $wgLocaltimezone = "Europe/Oslo";
# Only allow login through SSO # Only allow login through SSO
@ -166,7 +166,7 @@ in {
${pkgs.php}/bin/php ${pkg}/share/mediawiki/maintenance/update.php --conf ${mediawikiConfig} --quick ${pkgs.php}/bin/php ${pkg}/share/mediawiki/maintenance/update.php --conf ${mediawikiConfig} --quick
''; '';
services.nginx.virtualHosts."wiki2.pvv.ntnu.no" = { services.nginx.virtualHosts."bekkalokk.pvv.ntnu.no" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
root = "${config.services.mediawiki.finalPackage}/share/mediawiki"; root = "${config.services.mediawiki.finalPackage}/share/mediawiki";

View File

@ -5,7 +5,7 @@ $config = array(
'default-sp' => array( 'default-sp' => array(
'saml:SP', 'saml:SP',
# 'entityID' => 'https://wiki.pvv.ntnu.no/', # 'entityID' => 'https://wiki.pvv.ntnu.no/',
'entityID' => 'https://wiki2.pvv.ntnu.no/', 'entityID' => 'https://bekkalokk.pvv.ntnu.no/',
'idp' => 'https://idp.pvv.ntnu.no/', 'idp' => 'https://idp.pvv.ntnu.no/',
), ),
); );