diff options
Diffstat (limited to 'nixops/modules/websites')
19 files changed, 112 insertions, 53 deletions
diff --git a/nixops/modules/websites/tools/cloud/default.nix b/nixops/modules/websites/tools/cloud/default.nix index f014776..360d52c 100644 --- a/nixops/modules/websites/tools/cloud/default.nix +++ b/nixops/modules/websites/tools/cloud/default.nix | |||
@@ -18,7 +18,7 @@ in { | |||
18 | services.myWebsites.tools.vhostConfs.cloud = { | 18 | services.myWebsites.tools.vhostConfs.cloud = { |
19 | certName = "eldiron"; | 19 | certName = "eldiron"; |
20 | hosts = ["cloud.immae.eu" ]; | 20 | hosts = ["cloud.immae.eu" ]; |
21 | root = nextcloud.webRoot; | 21 | root = nextcloud.apache.root; |
22 | extraConfig = [ | 22 | extraConfig = [ |
23 | nextcloud.apache.vhostConf | 23 | nextcloud.apache.vhostConf |
24 | ]; | 24 | ]; |
@@ -37,6 +37,10 @@ in { | |||
37 | in [ occ ]; | 37 | in [ occ ]; |
38 | 38 | ||
39 | system.activationScripts.nextcloud = nextcloud.activationScript; | 39 | system.activationScripts.nextcloud = nextcloud.activationScript; |
40 | system.extraSystemBuilderCmds = '' | ||
41 | mkdir -p $out/webapps | ||
42 | ln -s ${nextcloud.webRoot} $out/webapps/${nextcloud.apache.webappName} | ||
43 | ''; | ||
40 | 44 | ||
41 | services.myPhpfpm = { | 45 | services.myPhpfpm = { |
42 | poolPhpConfigs.nextcloud = nextcloud.phpFpm.phpConfig; | 46 | poolPhpConfigs.nextcloud = nextcloud.phpFpm.phpConfig; |
diff --git a/nixops/modules/websites/tools/cloud/nextcloud.nix b/nixops/modules/websites/tools/cloud/nextcloud.nix index ac77920..d9e0be0 100644 --- a/nixops/modules/websites/tools/cloud/nextcloud.nix +++ b/nixops/modules/websites/tools/cloud/nextcloud.nix | |||
@@ -214,13 +214,15 @@ let | |||
214 | fi | 214 | fi |
215 | ''; | 215 | ''; |
216 | }; | 216 | }; |
217 | apache = { | 217 | apache = rec { |
218 | user = "wwwrun"; | 218 | user = "wwwrun"; |
219 | group = "wwwrun"; | 219 | group = "wwwrun"; |
220 | modules = [ "proxy_fcgi" ]; | 220 | modules = [ "proxy_fcgi" ]; |
221 | webappName = "tools_nextcloud"; | ||
222 | root = "/run/current-system/webapps/${webappName}"; | ||
221 | vhostConf = '' | 223 | vhostConf = '' |
222 | SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 | 224 | SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 |
223 | <Directory ${webRoot}> | 225 | <Directory ${root}> |
224 | AcceptPathInfo On | 226 | AcceptPathInfo On |
225 | DirectoryIndex index.php | 227 | DirectoryIndex index.php |
226 | Options FollowSymlinks | 228 | Options FollowSymlinks |
diff --git a/nixops/modules/websites/tools/dav/davical.nix b/nixops/modules/websites/tools/dav/davical.nix index 3f43607..6668fa1 100644 --- a/nixops/modules/websites/tools/dav/davical.nix +++ b/nixops/modules/websites/tools/dav/davical.nix | |||
@@ -89,14 +89,16 @@ let | |||
89 | buildInputs = [ gettext ]; | 89 | buildInputs = [ gettext ]; |
90 | }; | 90 | }; |
91 | webRoot = "${webapp}/htdocs"; | 91 | webRoot = "${webapp}/htdocs"; |
92 | apache = { | 92 | apache = rec { |
93 | user = "wwwrun"; | 93 | user = "wwwrun"; |
94 | group = "wwwrun"; | 94 | group = "wwwrun"; |
95 | modules = [ "proxy_fcgi" ]; | 95 | modules = [ "proxy_fcgi" ]; |
96 | webappName = "tools_davical"; | ||
97 | root = "/run/current-system/webapps/${webappName}"; | ||
96 | vhostConf = '' | 98 | vhostConf = '' |
97 | Alias /davical "${webRoot}" | 99 | Alias /davical "${root}" |
98 | Alias /caldav.php "${webRoot}/caldav.php" | 100 | Alias /caldav.php "${root}/caldav.php" |
99 | <Directory "${webRoot}"> | 101 | <Directory "${root}"> |
100 | DirectoryIndex index.php index.html | 102 | DirectoryIndex index.php index.html |
101 | AcceptPathInfo On | 103 | AcceptPathInfo On |
102 | AllowOverride None | 104 | AllowOverride None |
diff --git a/nixops/modules/websites/tools/dav/default.nix b/nixops/modules/websites/tools/dav/default.nix index ef9735e..5b5d21e 100644 --- a/nixops/modules/websites/tools/dav/default.nix +++ b/nixops/modules/websites/tools/dav/default.nix | |||
@@ -30,6 +30,11 @@ in { | |||
30 | davical = davical.phpFpm.pool; | 30 | davical = davical.phpFpm.pool; |
31 | }; | 31 | }; |
32 | 32 | ||
33 | system.extraSystemBuilderCmds = '' | ||
34 | mkdir -p $out/webapps | ||
35 | ln -s ${davical.webRoot} $out/webapps/${davical.apache.webappName} | ||
36 | ln -s ${infcloud.webRoot} $out/webapps/${infcloud.apache.webappName} | ||
37 | ''; | ||
33 | }; | 38 | }; |
34 | } | 39 | } |
35 | 40 | ||
diff --git a/nixops/modules/websites/tools/dav/infcloud.nix b/nixops/modules/websites/tools/dav/infcloud.nix index 876578b..f1204ab 100644 --- a/nixops/modules/websites/tools/dav/infcloud.nix +++ b/nixops/modules/websites/tools/dav/infcloud.nix | |||
@@ -18,14 +18,16 @@ let | |||
18 | ''; | 18 | ''; |
19 | buildInputs = [ ed ]; | 19 | buildInputs = [ ed ]; |
20 | }; | 20 | }; |
21 | apache = { | 21 | apache = rec { |
22 | user = "wwwrun"; | 22 | user = "wwwrun"; |
23 | group = "wwwrun"; | 23 | group = "wwwrun"; |
24 | webappName = "tools_infcloud"; | ||
25 | root = "/run/current-system/webapps/${webappName}"; | ||
24 | vhostConf = '' | 26 | vhostConf = '' |
25 | Alias /carddavmate ${webRoot} | 27 | Alias /carddavmate ${root} |
26 | Alias /caldavzap ${webRoot} | 28 | Alias /caldavzap ${root} |
27 | Alias /infcloud ${webRoot} | 29 | Alias /infcloud ${root} |
28 | <Directory ${webRoot}> | 30 | <Directory ${root}> |
29 | AllowOverride All | 31 | AllowOverride All |
30 | Options FollowSymlinks | 32 | Options FollowSymlinks |
31 | Require all granted | 33 | Require all granted |
diff --git a/nixops/modules/websites/tools/diaspora/default.nix b/nixops/modules/websites/tools/diaspora/default.nix index 87faee8..cd35385 100644 --- a/nixops/modules/websites/tools/diaspora/default.nix +++ b/nixops/modules/websites/tools/diaspora/default.nix | |||
@@ -5,6 +5,7 @@ let | |||
5 | env = myconfig.env.tools.diaspora; | 5 | env = myconfig.env.tools.diaspora; |
6 | }; | 6 | }; |
7 | 7 | ||
8 | root = "/run/current-system/webapps/tools_diaspora"; | ||
8 | cfg = config.services.myWebsites.tools.diaspora; | 9 | cfg = config.services.myWebsites.tools.diaspora; |
9 | in { | 10 | in { |
10 | options.services.myWebsites.tools.diaspora = { | 11 | options.services.myWebsites.tools.diaspora = { |
@@ -80,10 +81,14 @@ in { | |||
80 | "headers" "proxy" "proxy_http" | 81 | "headers" "proxy" "proxy_http" |
81 | ]; | 82 | ]; |
82 | security.acme.certs."eldiron".extraDomains."diaspora.immae.eu" = null; | 83 | security.acme.certs."eldiron".extraDomains."diaspora.immae.eu" = null; |
84 | system.extraSystemBuilderCmds = '' | ||
85 | mkdir -p $out/webapps | ||
86 | ln -s ${diaspora.railsRoot}/public/ $out/webapps/tools_diaspora | ||
87 | ''; | ||
83 | services.myWebsites.tools.vhostConfs.diaspora = { | 88 | services.myWebsites.tools.vhostConfs.diaspora = { |
84 | certName = "eldiron"; | 89 | certName = "eldiron"; |
85 | hosts = [ "diaspora.immae.eu" ]; | 90 | hosts = [ "diaspora.immae.eu" ]; |
86 | root = "${diaspora.railsRoot}/public/"; | 91 | root = root; |
87 | extraConfig = [ '' | 92 | extraConfig = [ '' |
88 | RewriteEngine On | 93 | RewriteEngine On |
89 | RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f | 94 | RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f |
@@ -98,7 +103,7 @@ in { | |||
98 | Require all granted | 103 | Require all granted |
99 | </Proxy> | 104 | </Proxy> |
100 | 105 | ||
101 | <Directory ${diaspora.railsRoot}/public> | 106 | <Directory ${root}> |
102 | Require all granted | 107 | Require all granted |
103 | Options -MultiViews | 108 | Options -MultiViews |
104 | </Directory> | 109 | </Directory> |
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 { | |||
26 | services.myWebsites.tools.modules = | 26 | services.myWebsites.tools.modules = |
27 | gitweb.apache.modules ++ | 27 | gitweb.apache.modules ++ |
28 | mantisbt.apache.modules; | 28 | mantisbt.apache.modules; |
29 | system.extraSystemBuilderCmds = '' | ||
30 | mkdir -p $out/webapps | ||
31 | ln -s ${gitweb.webRoot} $out/webapps/${gitweb.apache.webappName} | ||
32 | ln -s ${mantisbt.webRoot} $out/webapps/${mantisbt.apache.webappName} | ||
33 | ''; | ||
29 | 34 | ||
30 | services.myWebsites.tools.vhostConfs.git = { | 35 | services.myWebsites.tools.vhostConfs.git = { |
31 | certName = "eldiron"; | 36 | certName = "eldiron"; |
32 | hosts = ["git.immae.eu" ]; | 37 | hosts = ["git.immae.eu" ]; |
33 | root = gitweb.webRoot; | 38 | root = gitweb.apache.root; |
34 | extraConfig = [ | 39 | extraConfig = [ |
35 | gitweb.apache.vhostConf | 40 | gitweb.apache.vhostConf |
36 | mantisbt.apache.vhostConf | 41 | 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 { | |||
29 | $project_list_default_category = "__Others__"; | 29 | $project_list_default_category = "__Others__"; |
30 | $highlight_bin = "${highlight}/bin/highlight"; | 30 | $highlight_bin = "${highlight}/bin/highlight"; |
31 | ''; | 31 | ''; |
32 | apache = { | 32 | apache = rec { |
33 | user = "wwwrun"; | 33 | user = "wwwrun"; |
34 | group = "wwwrun"; | 34 | group = "wwwrun"; |
35 | modules = [ "cgid" ]; | 35 | modules = [ "cgid" ]; |
36 | webappName = "tools_gitweb"; | ||
37 | root = "/run/current-system/webapps/${webappName}"; | ||
36 | vhostConf = '' | 38 | vhostConf = '' |
37 | SetEnv GIT_PROJECT_ROOT ${varDir}/repositories/ | 39 | SetEnv GIT_PROJECT_ROOT ${varDir}/repositories/ |
38 | ScriptAliasMatch \ | 40 | ScriptAliasMatch \ |
@@ -44,13 +46,10 @@ rec { | |||
44 | git-(upload|receive)-pack))$" \ | 46 | git-(upload|receive)-pack))$" \ |
45 | ${git}/libexec/git-core/git-http-backend/$1 | 47 | ${git}/libexec/git-core/git-http-backend/$1 |
46 | 48 | ||
47 | <Directory "${gitolite}"> | ||
48 | Require all granted | ||
49 | </Directory> | ||
50 | <Directory "${git}/libexec/git-core"> | 49 | <Directory "${git}/libexec/git-core"> |
51 | Require all granted | 50 | Require all granted |
52 | </Directory> | 51 | </Directory> |
53 | <Directory "${webRoot}"> | 52 | <Directory "${root}"> |
54 | DirectoryIndex gitweb.cgi | 53 | DirectoryIndex gitweb.cgi |
55 | Require all granted | 54 | Require all granted |
56 | AllowOverride None | 55 | 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 | |||
72 | ln -s ${plugins.source-integration}/Source* $out/plugins/ | 72 | ln -s ${plugins.source-integration}/Source* $out/plugins/ |
73 | ''; | 73 | ''; |
74 | }; | 74 | }; |
75 | apache = { | 75 | apache = rec { |
76 | user = "wwwrun"; | 76 | user = "wwwrun"; |
77 | group = "wwwrun"; | 77 | group = "wwwrun"; |
78 | modules = [ "proxy_fcgi" ]; | 78 | modules = [ "proxy_fcgi" ]; |
79 | webappName = "tools_mantisbt"; | ||
80 | root = "/run/current-system/webapps/${webappName}"; | ||
79 | vhostConf = '' | 81 | vhostConf = '' |
80 | Alias /mantisbt "${webRoot}" | 82 | Alias /mantisbt "${root}" |
81 | <Directory "${webRoot}"> | 83 | <Directory "${root}"> |
82 | DirectoryIndex index.php | 84 | DirectoryIndex index.php |
83 | <FilesMatch "\.php$"> | 85 | <FilesMatch "\.php$"> |
84 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" | 86 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" |
@@ -88,7 +90,7 @@ let | |||
88 | Options FollowSymlinks | 90 | Options FollowSymlinks |
89 | Require all granted | 91 | Require all granted |
90 | </Directory> | 92 | </Directory> |
91 | <Directory "${webRoot}/admin"> | 93 | <Directory "${root}/admin"> |
92 | #Reenable during upgrade | 94 | #Reenable during upgrade |
93 | Require all denied | 95 | Require all denied |
94 | </Directory> | 96 | </Directory> |
diff --git a/nixops/modules/websites/tools/mastodon/default.nix b/nixops/modules/websites/tools/mastodon/default.nix index 0aaff70..6e34280 100644 --- a/nixops/modules/websites/tools/mastodon/default.nix +++ b/nixops/modules/websites/tools/mastodon/default.nix | |||
@@ -5,6 +5,7 @@ let | |||
5 | env = myconfig.env.tools.mastodon; | 5 | env = myconfig.env.tools.mastodon; |
6 | }; | 6 | }; |
7 | 7 | ||
8 | root = "/run/current-system/webapps/tools_mastodon"; | ||
8 | cfg = config.services.myWebsites.tools.mastodon; | 9 | cfg = config.services.myWebsites.tools.mastodon; |
9 | in { | 10 | in { |
10 | options.services.myWebsites.tools.mastodon = { | 11 | options.services.myWebsites.tools.mastodon = { |
@@ -138,10 +139,14 @@ in { | |||
138 | "headers" "proxy" "proxy_wstunnel" "proxy_http" | 139 | "headers" "proxy" "proxy_wstunnel" "proxy_http" |
139 | ]; | 140 | ]; |
140 | security.acme.certs."eldiron".extraDomains."mastodon.immae.eu" = null; | 141 | security.acme.certs."eldiron".extraDomains."mastodon.immae.eu" = null; |
142 | system.extraSystemBuilderCmds = '' | ||
143 | mkdir -p $out/webapps | ||
144 | ln -s ${mastodon.railsRoot}/public/ $out/webapps/tools_mastodon | ||
145 | ''; | ||
141 | services.myWebsites.tools.vhostConfs.mastodon = { | 146 | services.myWebsites.tools.vhostConfs.mastodon = { |
142 | certName = "eldiron"; | 147 | certName = "eldiron"; |
143 | hosts = ["mastodon.immae.eu" ]; | 148 | hosts = ["mastodon.immae.eu" ]; |
144 | root = "${mastodon.railsRoot}/public/"; | 149 | root = root; |
145 | extraConfig = [ '' | 150 | extraConfig = [ '' |
146 | Header always set Referrer-Policy "strict-origin-when-cross-origin" | 151 | Header always set Referrer-Policy "strict-origin-when-cross-origin" |
147 | Header always set Strict-Transport-Security "max-age=31536000" | 152 | Header always set Strict-Transport-Security "max-age=31536000" |
@@ -178,7 +183,7 @@ in { | |||
178 | Options -MultiViews | 183 | Options -MultiViews |
179 | </Directory> | 184 | </Directory> |
180 | 185 | ||
181 | <Directory ${mastodon.railsRoot}/public/> | 186 | <Directory ${root}> |
182 | Require all granted | 187 | Require all granted |
183 | Options -MultiViews +FollowSymlinks | 188 | Options -MultiViews +FollowSymlinks |
184 | </Directory> | 189 | </Directory> |
diff --git a/nixops/modules/websites/tools/tools/default.nix b/nixops/modules/websites/tools/tools/default.nix index 2060c79..7781928 100644 --- a/nixops/modules/websites/tools/tools/default.nix +++ b/nixops/modules/websites/tools/tools/default.nix | |||
@@ -118,6 +118,18 @@ in { | |||
118 | dokuwiki = dokuwiki.activationScript; | 118 | dokuwiki = dokuwiki.activationScript; |
119 | }; | 119 | }; |
120 | 120 | ||
121 | system.extraSystemBuilderCmds = '' | ||
122 | mkdir -p $out/webapps | ||
123 | ln -s ${dokuwiki.webRoot} $out/webapps/${dokuwiki.apache.webappName} | ||
124 | ln -s ${ldap.webRoot}/htdocs $out/webapps/${ldap.apache.webappName} | ||
125 | ln -s ${rompr.webRoot} $out/webapps/${rompr.apache.webappName} | ||
126 | ln -s ${roundcubemail.webRoot} $out/webapps/${roundcubemail.apache.webappName} | ||
127 | ln -s ${shaarli.webRoot} $out/webapps/${shaarli.apache.webappName} | ||
128 | ln -s ${ttrss.webRoot} $out/webapps/${ttrss.apache.webappName} | ||
129 | ln -s ${wallabag.webRoot} $out/webapps/${wallabag.apache.webappName} | ||
130 | ln -s ${yourls.webRoot} $out/webapps/${yourls.apache.webappName} | ||
131 | ''; | ||
132 | |||
121 | nixpkgs.config.packageOverrides = oldpkgs: rec { | 133 | nixpkgs.config.packageOverrides = oldpkgs: rec { |
122 | ympd = oldpkgs.ympd.overrideAttrs(old: mylibs.fetchedGithub ./ympd.json); | 134 | ympd = oldpkgs.ympd.overrideAttrs(old: mylibs.fetchedGithub ./ympd.json); |
123 | }; | 135 | }; |
diff --git a/nixops/modules/websites/tools/tools/dokuwiki.nix b/nixops/modules/websites/tools/tools/dokuwiki.nix index 5affddb..ad1497f 100644 --- a/nixops/modules/websites/tools/tools/dokuwiki.nix +++ b/nixops/modules/websites/tools/tools/dokuwiki.nix | |||
@@ -55,13 +55,15 @@ let | |||
55 | )} | 55 | )} |
56 | ''; | 56 | ''; |
57 | }); | 57 | }); |
58 | apache = { | 58 | apache = rec { |
59 | user = "wwwrun"; | 59 | user = "wwwrun"; |
60 | group = "wwwrun"; | 60 | group = "wwwrun"; |
61 | modules = [ "proxy_fcgi" ]; | 61 | modules = [ "proxy_fcgi" ]; |
62 | webappName = "tools_dokuwiki"; | ||
63 | root = "/run/current-system/webapps/${webappName}"; | ||
62 | vhostConf = '' | 64 | vhostConf = '' |
63 | Alias /dokuwiki "${webRoot}" | 65 | Alias /dokuwiki "${root}" |
64 | <Directory "${webRoot}"> | 66 | <Directory "${root}"> |
65 | DirectoryIndex index.php | 67 | DirectoryIndex index.php |
66 | <FilesMatch "\.php$"> | 68 | <FilesMatch "\.php$"> |
67 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" | 69 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" |
diff --git a/nixops/modules/websites/tools/tools/ldap.nix b/nixops/modules/websites/tools/tools/ldap.nix index 82615a7..6cde881 100644 --- a/nixops/modules/websites/tools/tools/ldap.nix +++ b/nixops/modules/websites/tools/tools/ldap.nix | |||
@@ -42,13 +42,15 @@ rec { | |||
42 | ln -sf ${config} $out/config/config.php | 42 | ln -sf ${config} $out/config/config.php |
43 | ''; | 43 | ''; |
44 | }; | 44 | }; |
45 | apache = { | 45 | apache = rec { |
46 | user = "wwwrun"; | 46 | user = "wwwrun"; |
47 | group = "wwwrun"; | 47 | group = "wwwrun"; |
48 | modules = [ "proxy_fcgi" ]; | 48 | modules = [ "proxy_fcgi" ]; |
49 | webappName = "tools_ldap"; | ||
50 | root = "/run/current-system/webapps/${webappName}"; | ||
49 | vhostConf = '' | 51 | vhostConf = '' |
50 | Alias /ldap "${webRoot}/htdocs" | 52 | Alias /ldap "${root}" |
51 | <Directory "${webRoot}/htdocs"> | 53 | <Directory "${root}"> |
52 | DirectoryIndex index.php | 54 | DirectoryIndex index.php |
53 | <FilesMatch "\.php$"> | 55 | <FilesMatch "\.php$"> |
54 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" | 56 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" |
diff --git a/nixops/modules/websites/tools/tools/rompr.nix b/nixops/modules/websites/tools/tools/rompr.nix index 98c48a7..baee2eb 100644 --- a/nixops/modules/websites/tools/tools/rompr.nix +++ b/nixops/modules/websites/tools/tools/rompr.nix | |||
@@ -14,14 +14,16 @@ let | |||
14 | ln -sf ../../../../../../${varDir}/albumart $out/albumart | 14 | ln -sf ../../../../../../${varDir}/albumart $out/albumart |
15 | ''; | 15 | ''; |
16 | }); | 16 | }); |
17 | apache = { | 17 | apache = rec { |
18 | user = "wwwrun"; | 18 | user = "wwwrun"; |
19 | group = "wwwrun"; | 19 | group = "wwwrun"; |
20 | modules = [ "headers" "mime" "proxy_fcgi" ]; | 20 | modules = [ "headers" "mime" "proxy_fcgi" ]; |
21 | webappName = "tools_rompr"; | ||
22 | root = "/run/current-system/webapps/${webappName}"; | ||
21 | vhostConf = '' | 23 | vhostConf = '' |
22 | Alias /rompr ${webRoot} | 24 | Alias /rompr ${root} |
23 | 25 | ||
24 | <Directory ${webRoot}> | 26 | <Directory ${root}> |
25 | Options Indexes FollowSymLinks | 27 | Options Indexes FollowSymLinks |
26 | DirectoryIndex index.php | 28 | DirectoryIndex index.php |
27 | AllowOverride all | 29 | AllowOverride all |
@@ -36,12 +38,12 @@ let | |||
36 | </FilesMatch> | 38 | </FilesMatch> |
37 | </Directory> | 39 | </Directory> |
38 | 40 | ||
39 | <Directory ${webRoot}/albumart/small> | 41 | <Directory ${root}/albumart/small> |
40 | Header Set Cache-Control "max-age=0, no-store" | 42 | Header Set Cache-Control "max-age=0, no-store" |
41 | Header Set Cache-Control "no-cache, must-revalidate" | 43 | Header Set Cache-Control "no-cache, must-revalidate" |
42 | </Directory> | 44 | </Directory> |
43 | 45 | ||
44 | <Directory ${webRoot}/albumart/asdownloaded> | 46 | <Directory ${root}/albumart/asdownloaded> |
45 | Header Set Cache-Control "max-age=0, no-store" | 47 | Header Set Cache-Control "max-age=0, no-store" |
46 | Header Set Cache-Control "no-cache, must-revalidate" | 48 | Header Set Cache-Control "no-cache, must-revalidate" |
47 | </Directory> | 49 | </Directory> |
diff --git a/nixops/modules/websites/tools/tools/roundcubemail.nix b/nixops/modules/websites/tools/tools/roundcubemail.nix index 877ea8b..c0a1125 100644 --- a/nixops/modules/websites/tools/tools/roundcubemail.nix +++ b/nixops/modules/websites/tools/tools/roundcubemail.nix | |||
@@ -61,13 +61,15 @@ let | |||
61 | )} | 61 | )} |
62 | ''; | 62 | ''; |
63 | }; | 63 | }; |
64 | apache = { | 64 | apache = rec { |
65 | user = "wwwrun"; | 65 | user = "wwwrun"; |
66 | group = "wwwrun"; | 66 | group = "wwwrun"; |
67 | modules = [ "proxy_fcgi" ]; | 67 | modules = [ "proxy_fcgi" ]; |
68 | webappName = "tools_roundcubemail"; | ||
69 | root = "/run/current-system/webapps/${webappName}"; | ||
68 | vhostConf = '' | 70 | vhostConf = '' |
69 | Alias /roundcube "${webRoot}" | 71 | Alias /roundcube "${root}" |
70 | <Directory "${webRoot}"> | 72 | <Directory "${root}"> |
71 | DirectoryIndex index.php | 73 | DirectoryIndex index.php |
72 | AllowOverride All | 74 | AllowOverride All |
73 | Options FollowSymlinks | 75 | Options FollowSymlinks |
diff --git a/nixops/modules/websites/tools/tools/shaarli.nix b/nixops/modules/websites/tools/tools/shaarli.nix index 9f3779f..a43d677 100644 --- a/nixops/modules/websites/tools/tools/shaarli.nix +++ b/nixops/modules/websites/tools/tools/shaarli.nix | |||
@@ -40,14 +40,16 @@ in rec { | |||
40 | ${varDir}/phpSessions | 40 | ${varDir}/phpSessions |
41 | ''; | 41 | ''; |
42 | webRoot = shaarli; | 42 | webRoot = shaarli; |
43 | apache = { | 43 | apache = rec { |
44 | user = "wwwrun"; | 44 | user = "wwwrun"; |
45 | group = "wwwrun"; | 45 | group = "wwwrun"; |
46 | modules = [ "proxy_fcgi" "rewrite" "env" ]; | 46 | modules = [ "proxy_fcgi" "rewrite" "env" ]; |
47 | webappName = "tools_shaarli"; | ||
48 | root = "/run/current-system/webapps/${webappName}"; | ||
47 | vhostConf = '' | 49 | vhostConf = '' |
48 | Alias /Shaarli "${webRoot}" | 50 | Alias /Shaarli "${root}" |
49 | 51 | ||
50 | <Directory "${webRoot}"> | 52 | <Directory "${root}"> |
51 | SetEnv SHAARLI_LDAP_PASSWORD "${env.ldap.password}" | 53 | SetEnv SHAARLI_LDAP_PASSWORD "${env.ldap.password}" |
52 | SetEnv SHAARLI_LDAP_DN "${env.ldap.dn}" | 54 | SetEnv SHAARLI_LDAP_DN "${env.ldap.dn}" |
53 | SetEnv SHAARLI_LDAP_HOST "ldaps://${env.ldap.host}" | 55 | SetEnv SHAARLI_LDAP_HOST "ldaps://${env.ldap.host}" |
diff --git a/nixops/modules/websites/tools/tools/ttrss.nix b/nixops/modules/websites/tools/tools/ttrss.nix index 9e6f98d..c66b99d 100644 --- a/nixops/modules/websites/tools/tools/ttrss.nix +++ b/nixops/modules/websites/tools/tools/ttrss.nix | |||
@@ -128,13 +128,15 @@ let | |||
128 | )} | 128 | )} |
129 | ''; | 129 | ''; |
130 | }); | 130 | }); |
131 | apache = { | 131 | apache = rec { |
132 | user = "wwwrun"; | 132 | user = "wwwrun"; |
133 | group = "wwwrun"; | 133 | group = "wwwrun"; |
134 | modules = [ "proxy_fcgi" ]; | 134 | modules = [ "proxy_fcgi" ]; |
135 | webappName = "tools_ttrss"; | ||
136 | root = "/run/current-system/webapps/${webappName}"; | ||
135 | vhostConf = '' | 137 | vhostConf = '' |
136 | Alias /ttrss "${webRoot}" | 138 | Alias /ttrss "${root}" |
137 | <Directory "${webRoot}"> | 139 | <Directory "${root}"> |
138 | DirectoryIndex index.php | 140 | DirectoryIndex index.php |
139 | <FilesMatch "\.php$"> | 141 | <FilesMatch "\.php$"> |
140 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" | 142 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" |
diff --git a/nixops/modules/websites/tools/tools/wallabag.nix b/nixops/modules/websites/tools/tools/wallabag.nix index 1c08bbf..cd38e19 100644 --- a/nixops/modules/websites/tools/tools/wallabag.nix +++ b/nixops/modules/websites/tools/tools/wallabag.nix | |||
@@ -125,13 +125,15 @@ let | |||
125 | webRoot = "${webappDir}/web"; | 125 | webRoot = "${webappDir}/web"; |
126 | # Domain migration: Table wallabag_entry contains whole | 126 | # Domain migration: Table wallabag_entry contains whole |
127 | # https://tools.immae.eu/wallabag domain name in preview_picture | 127 | # https://tools.immae.eu/wallabag domain name in preview_picture |
128 | apache = { | 128 | apache = rec { |
129 | user = "wwwrun"; | 129 | user = "wwwrun"; |
130 | group = "wwwrun"; | 130 | group = "wwwrun"; |
131 | modules = [ "proxy_fcgi" ]; | 131 | modules = [ "proxy_fcgi" ]; |
132 | webappName = "tools_wallabag"; | ||
133 | root = "/run/current-system/webapps/${webappName}"; | ||
132 | vhostConf = '' | 134 | vhostConf = '' |
133 | Alias /wallabag "${webRoot}" | 135 | Alias /wallabag "${root}" |
134 | <Directory "${webRoot}"> | 136 | <Directory "${root}"> |
135 | AllowOverride None | 137 | AllowOverride None |
136 | Require all granted | 138 | Require all granted |
137 | # For OAuth (apps) | 139 | # For OAuth (apps) |
@@ -148,7 +150,7 @@ let | |||
148 | RewriteRule ^(.*)$ app.php [QSA,L] | 150 | RewriteRule ^(.*)$ app.php [QSA,L] |
149 | </IfModule> | 151 | </IfModule> |
150 | </Directory> | 152 | </Directory> |
151 | <Directory "${webRoot}/bundles"> | 153 | <Directory "${root}/bundles"> |
152 | <IfModule mod_rewrite.c> | 154 | <IfModule mod_rewrite.c> |
153 | RewriteEngine Off | 155 | RewriteEngine Off |
154 | </IfModule> | 156 | </IfModule> |
diff --git a/nixops/modules/websites/tools/tools/yourls.nix b/nixops/modules/websites/tools/tools/yourls.nix index 66dd2fd..b12edfa 100644 --- a/nixops/modules/websites/tools/tools/yourls.nix +++ b/nixops/modules/websites/tools/tools/yourls.nix | |||
@@ -52,13 +52,15 @@ let | |||
52 | )} | 52 | )} |
53 | ''; | 53 | ''; |
54 | }); | 54 | }); |
55 | apache = { | 55 | apache = rec { |
56 | user = "wwwrun"; | 56 | user = "wwwrun"; |
57 | group = "wwwrun"; | 57 | group = "wwwrun"; |
58 | modules = [ "proxy_fcgi" ]; | 58 | modules = [ "proxy_fcgi" ]; |
59 | webappName = "tools_yourls"; | ||
60 | root = "/run/current-system/webapps/${webappName}"; | ||
59 | vhostConf = '' | 61 | vhostConf = '' |
60 | Alias /url "${webRoot}" | 62 | Alias /url "${root}" |
61 | <Directory "${webRoot}"> | 63 | <Directory "${root}"> |
62 | <FilesMatch "\.php$"> | 64 | <FilesMatch "\.php$"> |
63 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" | 65 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" |
64 | </FilesMatch> | 66 | </FilesMatch> |