diff options
Diffstat (limited to 'nixops/modules/websites/tools/mastodon')
-rw-r--r-- | nixops/modules/websites/tools/mastodon/default.nix | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/nixops/modules/websites/tools/mastodon/default.nix b/nixops/modules/websites/tools/mastodon/default.nix index 3740a49..0aaff70 100644 --- a/nixops/modules/websites/tools/mastodon/default.nix +++ b/nixops/modules/websites/tools/mastodon/default.nix | |||
@@ -135,8 +135,7 @@ in { | |||
135 | }; | 135 | }; |
136 | 136 | ||
137 | services.myWebsites.tools.modules = [ | 137 | services.myWebsites.tools.modules = [ |
138 | "headers" "proxy" "proxy_wstunnel" "proxy_http" "proxy_balancer" | 138 | "headers" "proxy" "proxy_wstunnel" "proxy_http" |
139 | "lbmethod_byrequests" "lbmethod_bytraffic" "lbmethod_bybusyness" "lbmethod_heartbeat" | ||
140 | ]; | 139 | ]; |
141 | security.acme.certs."eldiron".extraDomains."mastodon.immae.eu" = null; | 140 | security.acme.certs."eldiron".extraDomains."mastodon.immae.eu" = null; |
142 | services.myWebsites.tools.vhostConfs.mastodon = { | 141 | services.myWebsites.tools.vhostConfs.mastodon = { |
@@ -167,23 +166,10 @@ in { | |||
167 | ProxyPassMatch ^(/.*\.(png|ico|gif)$) ! | 166 | ProxyPassMatch ^(/.*\.(png|ico|gif)$) ! |
168 | ProxyPassMatch ^/(assets|avatars|emoji|headers|packs|sounds|system|.well-known/acme-challenge) ! | 167 | ProxyPassMatch ^/(assets|avatars|emoji|headers|packs|sounds|system|.well-known/acme-challenge) ! |
169 | 168 | ||
170 | ProxyPassMatch /api/v1/streaming/(.+)$ balancer://node_servers_http/api/v1/streaming/$1 | 169 | RewriteRule ^/api/v1/streaming/(.+)$ unix://${mastodon.nodeSocket}|http://mastodon.immae.eu/api/v1/streaming/$1 [P,NE,QSA,L] |
171 | ProxyPass /api/v1/streaming/ balancer://node_servers/ | 170 | RewriteRule ^/api/v1/streaming/$ unix://${mastodon.nodeSocket}|ws://mastodon.immae.eu/ [P,NE,QSA,L] |
172 | ProxyPassReverse /api/v1/streaming/ balancer://node_servers/ | 171 | ProxyPass / unix://${mastodon.railsSocket}|http://mastodon.immae.eu/ |
173 | ProxyPass / balancer://puma_servers/ | 172 | ProxyPassReverse / unix://${mastodon.railsSocket}|http://mastodon.immae.eu/ |
174 | ProxyPassReverse / balancer://puma_servers/ | ||
175 | |||
176 | <Proxy balancer://puma_servers> | ||
177 | BalancerMember unix://${mastodon.railsSocket}|http:// | ||
178 | </Proxy> | ||
179 | |||
180 | <Proxy balancer://node_servers> | ||
181 | BalancerMember unix://${mastodon.nodeSocket}|ws://localhost | ||
182 | </Proxy> | ||
183 | |||
184 | <Proxy balancer://node_servers_http> | ||
185 | BalancerMember unix://${mastodon.nodeSocket}|http://localhost | ||
186 | </Proxy> | ||
187 | 173 | ||
188 | Alias /system ${mastodon.varDir} | 174 | Alias /system ${mastodon.varDir} |
189 | 175 | ||