From a95ab089420d6edf24f22500dabf7876d329dc91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 16 Feb 2019 15:31:07 +0100 Subject: Move tools websites to stable web directories --- nixops/modules/websites/tools/git/default.nix | 7 ++++++- nixops/modules/websites/tools/git/gitweb/gitweb.nix | 9 ++++----- nixops/modules/websites/tools/git/mantisbt/mantisbt.nix | 10 ++++++---- 3 files changed, 16 insertions(+), 10 deletions(-) (limited to 'nixops/modules/websites/tools/git') diff --git a/nixops/modules/websites/tools/git/default.nix b/nixops/modules/websites/tools/git/default.nix index 91aa1d0..2aa86cd 100644 --- a/nixops/modules/websites/tools/git/default.nix +++ b/nixops/modules/websites/tools/git/default.nix @@ -26,11 +26,16 @@ in { services.myWebsites.tools.modules = gitweb.apache.modules ++ mantisbt.apache.modules; + system.extraSystemBuilderCmds = '' + mkdir -p $out/webapps + ln -s ${gitweb.webRoot} $out/webapps/${gitweb.apache.webappName} + ln -s ${mantisbt.webRoot} $out/webapps/${mantisbt.apache.webappName} + ''; services.myWebsites.tools.vhostConfs.git = { certName = "eldiron"; hosts = ["git.immae.eu" ]; - root = gitweb.webRoot; + root = gitweb.apache.root; extraConfig = [ gitweb.apache.vhostConf mantisbt.apache.vhostConf diff --git a/nixops/modules/websites/tools/git/gitweb/gitweb.nix b/nixops/modules/websites/tools/git/gitweb/gitweb.nix index 22c70f2..2ee7a63 100644 --- a/nixops/modules/websites/tools/git/gitweb/gitweb.nix +++ b/nixops/modules/websites/tools/git/gitweb/gitweb.nix @@ -29,10 +29,12 @@ rec { $project_list_default_category = "__Others__"; $highlight_bin = "${highlight}/bin/highlight"; ''; - apache = { + apache = rec { user = "wwwrun"; group = "wwwrun"; modules = [ "cgid" ]; + webappName = "tools_gitweb"; + root = "/run/current-system/webapps/${webappName}"; vhostConf = '' SetEnv GIT_PROJECT_ROOT ${varDir}/repositories/ ScriptAliasMatch \ @@ -44,13 +46,10 @@ rec { git-(upload|receive)-pack))$" \ ${git}/libexec/git-core/git-http-backend/$1 - - Require all granted - Require all granted - + DirectoryIndex gitweb.cgi Require all granted AllowOverride None diff --git a/nixops/modules/websites/tools/git/mantisbt/mantisbt.nix b/nixops/modules/websites/tools/git/mantisbt/mantisbt.nix index b1837eb..9bb8476 100644 --- a/nixops/modules/websites/tools/git/mantisbt/mantisbt.nix +++ b/nixops/modules/websites/tools/git/mantisbt/mantisbt.nix @@ -72,13 +72,15 @@ let ln -s ${plugins.source-integration}/Source* $out/plugins/ ''; }; - apache = { + apache = rec { user = "wwwrun"; group = "wwwrun"; modules = [ "proxy_fcgi" ]; + webappName = "tools_mantisbt"; + root = "/run/current-system/webapps/${webappName}"; vhostConf = '' - Alias /mantisbt "${webRoot}" - + Alias /mantisbt "${root}" + DirectoryIndex index.php SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" @@ -88,7 +90,7 @@ let Options FollowSymlinks Require all granted - + #Reenable during upgrade Require all denied -- cgit v1.2.3