- Edited
I want my SOGo be available at mail.mydomain.com
not at webmail.mailhost.com/SOGo
I have such attributes inside mailcow.conf
MAILCOW_HOSTNAME=webmail.mailhost.com
ADDITIONAL_SAN=mail.mydomain.com,*.mydomain.com
ENABLE_SSL_SNI=y (because i will need more than 100 domains)
ADDITIONAL_SERVER_NAMES=
And i have created additional nginx config under data/conf/nginx/mail.conf
similar to this
GNU nano 8.1
server {
ssl_certificate /etc/ssl/mail/cert.pem;
ssl_certificate_key /etc/ssl/mail/key.pem;
index index.php index.html;
client_max_body_size 0;
root /web;
include /etc/nginx/conf.d/listen_plain.active;
include /etc/nginx/conf.d/listen_ssl.active;
server_name mail.mydomain.com;
server_tokens off;location ^~ /.well-known/acme-challenge/ {
allow all;
default_type โtext/plainโ;
}
location / {
proxy_pass http://sogo-mailcow:20000;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 0;
proxy_buffer_size 128k;
proxy_buffers 64 512k;
proxy_busy_buffers_size 512k;
}
}
But this return page without any css style applied
I even tried to replace proxy_pass http://sogo-mailcow:20000;
with proxy_pass http://webmail.mydomain.com/SOGo;
but this cause recursive proxy forwarding
What should i do to resolve such mapping?