@DocFraggle I use the NGINX that comes with the mailcow-dockerized installation.
That ist the redirect.conf for nginx
server {
root /web;
listen 80 default_server;
listen [::]:80 default_server;
include /etc/nginx/conf.d/server_name.active;
if ( $request_uri ~* “%0A|%0D” ) { return 403; }
location ^~ /.well-known/acme-challenge/ {
allow all;
default_type “text/plain”;
}
location / {
return 301 https://$host$uri$is_args$args;
}
}
and the parts out of the nginx.conf.j2
location ^~ /SOGo {
location ~* ^/SOGo/so/.*.(xml|js|html|xhtml)$ {
auth_request /sogo-auth-verify;
auth_request_set $user $upstream_http_x_user;
auth_request_set $auth $upstream_http_x_auth;
auth_request_set $auth_type $upstream_http_x_auth_type;
proxy_set_header x-webobjects-remote-user “$user”;
proxy_set_header Authorization “$auth”;
proxy_set_header x-webobjects-auth-type “$auth_type”;
proxy_pass http://{{ SOGOHOST }}:20000;
proxy_set_header X-Forwarded-For {% if not NGINX_USE_PROXY_PROTOCOL %}$proxy_add_x_forwarded_for{% else %}$proxy_protocol_addr{%endif%};
proxy_set_header X-Real-IP {% if not NGINX_USE_PROXY_PROTOCOL %}$remote_addr{% else %}$proxy_protocol_addr{%endif%};
proxy_set_header Host $http_host;
proxy_set_header x-webobjects-server-protocol HTTP/1.0;
proxy_set_header x-webobjects-remote-host $remote_addr;
proxy_set_header x-webobjects-server-name $server_name;
proxy_set_header x-webobjects-server-url $client_req_scheme://$http_host;
proxy_set_header x-webobjects-server-port $server_port;
proxy_hide_header Content-Type;
add_header Content-Type text/plain;
break;
}
auth_request /sogo-auth-verify;
auth_request_set $user $upstream_http_x_user;
auth_request_set $auth $upstream_http_x_auth;
auth_request_set $auth_type $upstream_http_x_auth_type;
proxy_set_header x-webobjects-remote-user "$user";
proxy_set_header Authorization "$auth";
proxy_set_header x-webobjects-auth-type "$auth_type";
proxy_pass http://{{ SOGOHOST }}:20000;
proxy_set_header X-Forwarded-For {% if not NGINX_USE_PROXY_PROTOCOL %}$proxy_add_x_forwarded_for{% else %}$proxy_protocol_addr{%endif%};
proxy_set_header X-Real-IP {% if not NGINX_USE_PROXY_PROTOCOL %}$remote_addr{% else %}$proxy_protocol_addr{%endif%};
proxy_set_header Host $http_host;
proxy_set_header x-webobjects-server-protocol HTTP/1.0;
proxy_set_header x-webobjects-remote-host $remote_addr;
proxy_set_header x-webobjects-server-name $server_name;
proxy_set_header x-webobjects-server-url $client_req_scheme://$http_host;
proxy_set_header x-webobjects-server-port $server_port;
proxy_buffer_size 128k;
proxy_buffers 64 512k;
proxy_busy_buffers_size 512k;
proxy_send_timeout 3600;
proxy_read_timeout 3600;
client_body_buffer_size 128k;
client_max_body_size 0;
break;
}
location ~* /sogo$ {
return 301 $client_req_scheme://$http_host/SOGo;
}
location /SOGo.woa/WebServerResources/ {
alias /usr/lib/GNUstep/SOGo/WebServerResources/;
}
location /.woa/WebServerResources/ {
alias /usr/lib/GNUstep/SOGo/WebServerResources/;
}
location /SOGo/WebServerResources/ {
alias /usr/lib/GNUstep/SOGo/WebServerResources/;
}
location (^/SOGo/so/ControlPanel/Products/[^/]UI/Resources/..(jpg|png|gif|css|js)$) {
alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
}
{% endif %}
this is from the sogo log
mailcowdockerized-sogo-mailcow-1 | Jul 14 10:30:23 2f1ca1a65093 sogod [54]: 95.223.78.86 “GET /SOGo/so HTTP/1.0” 302 0/0 0.001 - - 0 - 12
mailcowdockerized-sogo-mailcow-1 | Jul 14 10:30:23 2f1ca1a65093 sogod [54]: 95.223.78.86 “GET /SOGo/so/ HTTP/1.0” 200 11943/0 0.020 43453 72% 0 - 12
this is from the sogo log
mailcowdockerized-sogo-mailcow-1 | Jul 14 10:30:23 2f1ca1a65093 sogod [54]: 95.223.78.86 “GET /SOGo/so HTTP/1.0” 302 0/0 0.001 - - 0 - 12
mailcowdockerized-sogo-mailcow-1 | Jul 14 10:30:23 2f1ca1a65093 sogod [54]: 95.223.78.86 “GET /SOGo/so/ HTTP/1.0” 200 11943/0 0.020 43453 72% 0 - 12
form the logfile
mailcowdockerized-sogo-mailcow-1 | Jul 14 10:30:23 2f1ca1a65093 sogod [54]: 95.223.78.86 “GET /SOGo/so HTTP/1.0” 302 0/0 0.001 - - 0 - 12
mailcowdockerized-sogo-mailcow-1 | Jul 14 10:30:23 2f1ca1a65093 sogod [54]: 95.223.78.86 “GET /SOGo/so/ HTTP/1.0” 200 11943/0 0.020 43453 72% 0 - 12