X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=nixops%2Fmodules%2Fwebsites%2Ftools%2Fmastodon%2Fdefault.nix;h=0aaff70ed6fe2719e11af07211d8fee87f2a2425;hp=3740a49c60c4644e5fdcad618152f25147d440c5;hb=a952acc4347d5d77b3c67283ca6249b49a6c9231;hpb=6533428a7b06fef01bebf1b8f93052884f77ea68 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 { }; services.myWebsites.tools.modules = [ - "headers" "proxy" "proxy_wstunnel" "proxy_http" "proxy_balancer" - "lbmethod_byrequests" "lbmethod_bytraffic" "lbmethod_bybusyness" "lbmethod_heartbeat" + "headers" "proxy" "proxy_wstunnel" "proxy_http" ]; security.acme.certs."eldiron".extraDomains."mastodon.immae.eu" = null; services.myWebsites.tools.vhostConfs.mastodon = { @@ -167,23 +166,10 @@ in { ProxyPassMatch ^(/.*\.(png|ico|gif)$) ! ProxyPassMatch ^/(assets|avatars|emoji|headers|packs|sounds|system|.well-known/acme-challenge) ! - ProxyPassMatch /api/v1/streaming/(.+)$ balancer://node_servers_http/api/v1/streaming/$1 - ProxyPass /api/v1/streaming/ balancer://node_servers/ - ProxyPassReverse /api/v1/streaming/ balancer://node_servers/ - ProxyPass / balancer://puma_servers/ - ProxyPassReverse / balancer://puma_servers/ - - - BalancerMember unix://${mastodon.railsSocket}|http:// - - - - BalancerMember unix://${mastodon.nodeSocket}|ws://localhost - - - - BalancerMember unix://${mastodon.nodeSocket}|http://localhost - + RewriteRule ^/api/v1/streaming/(.+)$ unix://${mastodon.nodeSocket}|http://mastodon.immae.eu/api/v1/streaming/$1 [P,NE,QSA,L] + RewriteRule ^/api/v1/streaming/$ unix://${mastodon.nodeSocket}|ws://mastodon.immae.eu/ [P,NE,QSA,L] + ProxyPass / unix://${mastodon.railsSocket}|http://mastodon.immae.eu/ + ProxyPassReverse / unix://${mastodon.railsSocket}|http://mastodon.immae.eu/ Alias /system ${mastodon.varDir}