How to use nginx as a reverse proxy to conceal the /SOGo and /SOGo/so in
the URL?
Say, we would like to goto SOGo main interface with:
mail.example.com
instead of
mail.example.com/SOGo
this is our current config in /etc/nginx/conf.d/default, in Ubuntu 14.04:
-----------------------------------------------------------
location / {
proxy_pass http://127.0.0.1:20000;
proxy_set_header x-webobjects-server-protocol HTTP/1.0;
}
location ~ ^/sogo { rewrite ^ https://$host/SOGo; }
location ~ ^/SOGO { rewrite ^ https://$host/SOGo; }
location ^~ /SOGo {
proxy_pass http://127.0.0.1:20000;
proxy_set_header x-webobjects-server-protocol HTTP/1.0;
}
location ^~ /Microsoft-Server-ActiveSync {
proxy_pass http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync;
proxy_redirect http://127.0.0.1:20000/Microsoft-Server-ActiveSync /;
}
location /SOGo.woa/WebServerResources/ {
alias /usr/lib/GNUstep/SOGo/WebServerResources/;
}
location /SOGo/WebServerResources/ {
alias /usr/lib/GNUstep/SOGo/WebServerResources/;
}
location ^/SOGo/so/ControlPanel/Products/([^/]*)/Resources/(.*)$ {
alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
}
-----------------------------------------------------------
With this setting mail.example.com can get to the main SOGo interface
sucessfully,
but logging in after entering user/password SOGo will prompt 'bad
authentication', whereas in sogo.log it does prompt sucessfully logged in.
Thanks.
--
[email protected]
https://inverse.ca/sogo/lists