]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Cleanup balancers for httpd
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 28 Jan 2019 08:57:25 +0000 (09:57 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 28 Jan 2019 08:57:25 +0000 (09:57 +0100)
Fixes https://git.immae.eu/mantisbt/view.php?id=91

nixops/modules/websites/tools/diaspora/default.nix
nixops/modules/websites/tools/ether/default.nix
nixops/modules/websites/tools/mastodon/default.nix
nixops/modules/websites/tools/mediagoblin/default.nix

index 8d62c7e3f798830faf963d250475c2802a7c87ba..87faee848e4d6a2dc7e7dbb01ff13c34c06a97eb 100644 (file)
@@ -77,8 +77,7 @@ in {
     };
 
     services.myWebsites.tools.modules = [
-      "headers" "proxy" "proxy_http" "proxy_balancer"
-      "lbmethod_byrequests" "lbmethod_bytraffic" "lbmethod_bybusyness" "lbmethod_heartbeat"
+      "headers" "proxy" "proxy_http"
     ];
     security.acme.certs."eldiron".extraDomains."diaspora.immae.eu" = null;
     services.myWebsites.tools.vhostConfs.diaspora = {
@@ -88,11 +87,7 @@ in {
       extraConfig = [ ''
         RewriteEngine On
         RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
-        RewriteRule ^/(.*)$ balancer://thinservers%{REQUEST_URI} [P,QSA,L]
-
-        <Proxy balancer://thinservers>
-            BalancerMember unix://${diaspora.railsSocket}|http://
-        </Proxy>
+        RewriteRule ^/(.*)$ unix://${diaspora.railsSocket}|http://diaspora.immae.eu/%{REQUEST_URI} [P,NE,QSA,L]
 
         ProxyRequests Off
         ProxyVia On
index 5ee34332d1796a90ad166ff02db7f1325a6317ab..c4a9932556bbc3b51c19682d0e237e0a1d038ed8 100644 (file)
@@ -75,8 +75,6 @@ in {
           ProxyPreserveHost On
           ProxyPass         / http://localhost:${etherpad.listenPort}/
           ProxyPassReverse  / http://localhost:${etherpad.listenPort}/
-          ProxyPass         /socket.io ws://localhost:${etherpad.listenPort}/socket.io
-          ProxyPassReverse  /socket.io ws://localhost:${etherpad.listenPort}/socket.io
           <Proxy *>
             Options FollowSymLinks MultiViews
             AllowOverride None
index 3740a49c60c4644e5fdcad618152f25147d440c5..0aaff70ed6fe2719e11af07211d8fee87f2a2425 100644 (file)
@@ -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/
-
-        <Proxy balancer://puma_servers>
-            BalancerMember unix://${mastodon.railsSocket}|http://
-        </Proxy>
-
-        <Proxy balancer://node_servers>
-            BalancerMember unix://${mastodon.nodeSocket}|ws://localhost
-        </Proxy>
-
-        <Proxy balancer://node_servers_http>
-            BalancerMember unix://${mastodon.nodeSocket}|http://localhost
-        </Proxy>
+        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}
 
index 90b115e1e3cddd11fb8d488010ac1c18f4954b8b..54c0478d022cc6779466134f615f134d7fb6a70d 100644 (file)
@@ -101,8 +101,7 @@ in {
     };
 
     services.myWebsites.tools.modules = [
-      "proxy" "proxy_http" "proxy_balancer"
-      "lbmethod_byrequests" "lbmethod_bytraffic" "lbmethod_bybusyness" "lbmethod_heartbeat"
+      "proxy" "proxy_http"
     ];
     users.users.wwwrun.extraGroups = [ "mediagoblin" ];
     security.acme.certs."eldiron".extraDomains."mgoblin.immae.eu" = null;
@@ -136,11 +135,8 @@ in {
         ProxyPass /theme_static !
         ProxyPass /plugin_static !
         ProxyPassMatch ^/.well-known/acme-challenge !
-        ProxyPass / balancer://paster_server/
-        ProxyPassReverse / balancer://paster_server
-        <Proxy balancer://paster_server>
-          BalancerMember unix://${mediagoblin.socketsDir}/mediagoblin.sock|http://
-        </Proxy>
+        ProxyPass / unix://${mediagoblin.socketsDir}/mediagoblin.sock|http://mgoblin.immae.eu/
+        ProxyPassReverse / unix://${mediagoblin.socketsDir}/mediagoblin.sock|http://mgoblin.immae.eu/
       '' ];
     };
   };