From dbf1f4b557702499dd00ea40e039aae620cad14f Mon Sep 17 00:00:00 2001 From: Mickael TONNELIER Date: Tue, 19 Nov 2024 10:51:54 +0100 Subject: [PATCH] - add compatibility with tomcat 11 - use modern docker configuration with replicat - fixed path on tomcat 7 configuration --- cluster/default-3.7.conf | 51 ++++++++++++ cluster/default.conf | 9 +- cluster/server-3.7.xml | 175 +++++++++++++++++++++++++++++++++++++++ cluster/server.xml | 9 +- docker-compose-3-7.yml | 26 +++--- docker-compose.yml | 59 ++++++------- 6 files changed, 275 insertions(+), 54 deletions(-) create mode 100644 cluster/default-3.7.conf create mode 100644 cluster/server-3.7.xml diff --git a/cluster/default-3.7.conf b/cluster/default-3.7.conf new file mode 100644 index 0000000..b841dce --- /dev/null +++ b/cluster/default-3.7.conf @@ -0,0 +1,51 @@ +upstream backend { + server tomcat1:8080; + server tomcat2:8080; + server tomcat3:8080; +} + +server { + listen 80; + server_name localhost; + + #charset koi8-r; + #access_log /var/log/nginx/log/host.access.log main; + + location / { + proxy_pass http://backend; + } + + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} + diff --git a/cluster/default.conf b/cluster/default.conf index 2e988dd..851ab41 100644 --- a/cluster/default.conf +++ b/cluster/default.conf @@ -1,10 +1,3 @@ -upstream backend { - server tomcat1:8080; - server tomcat2:8080; - server tomcat3:8080; -} - - server { listen 80; @@ -14,7 +7,7 @@ server { #access_log /var/log/nginx/log/host.access.log main; location / { - proxy_pass http://backend; + proxy_pass http://backend:8080; } diff --git a/cluster/server-3.7.xml b/cluster/server-3.7.xml new file mode 100644 index 0000000..9c42664 --- /dev/null +++ b/cluster/server-3.7.xml @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cluster/server.xml b/cluster/server.xml index c9d3b16..303e79e 100644 --- a/cluster/server.xml +++ b/cluster/server.xml @@ -88,8 +88,7 @@ --> - - + - - + + @@ -131,7 +130,7 @@ - +