On 2017/10/10 13:34, Marcus MERIGHI wrote:
> Currently there is one major disadvantage of running SOGo behind
> relayd(8) and httpd(8), it is documented at
>
> https://sogo.nu/bugs/view.php?id=4252
>
> For me the problem is seen with thunderbird when saving a changed
> calendar entry. The change is done by SOGo but the response is wrong,
> RFC-wise, so relayd(8) makes it an 500 (Internal Server error) and
> Thunderbird throws an error to the user.
Will upstream ever fix it if there's a workaround like this in the package
documentation?
> Anyways, this works for me:
>
> Index: README
Anything which changes the package means you must bump REVISION.
> ===================================================================
> RCS file: /cvs/ports/www/sogo/pkg/README,v
> retrieving revision 1.21
> diff -u -p -u -r1.21 README
> --- README 5 Jul 2017 21:11:50 -0000 1.21
> +++ README 10 Oct 2017 11:15:18 -0000
> @@ -51,6 +51,95 @@ The SOPE PostgreSQL database adaptor is
> If you want to use a MySQL database as backend, you have to install
> the sope-mysql package on the host where SOPE and SOGo are installed.
>
> +SOGo with base relayd(8) and httpd(8)
> +===============
The ='s are supposed to underline the above text, so there are meant to be
the same number of = as characters on the line above.
> +Edit /etc/relayd.conf
> +
> +table <httpd> { 127.0.0.1 }
> +table <sogo_app> { 127.0.0.1 }
> +table <sogo_static> { 127.0.0.1 }
> +
> +http protocol httpproto {
> + return error
> + block
> +
> + match request path "/SOGo/" forward to <sogo_app> tag dav
> + match request path "/SOGo/*" forward to <sogo_app> tag dav
> + match request path "/sogo/" forward to <sogo_app> tag dav
> + match request path "/sogo/*" forward to <sogo_app> tag dav
> + match request path "/SOGo.woa/*" forward to <sogo_static> tag davstat
> +
> + match response header remove "Server"
> + match response header set "Connection" value "close"
> +
> + match request header set "Keep-Alive" value "$TIMEOUT"
> +
> + match request tagged dav header set "X-Real-IP" \
> + value "https://$REMOTE_ADDR"
> + match request tagged dav header set "X-Forwarded-By" \
> + value "$SERVER_ADDR:$SERVER_PORT"
> + match request tagged dav header set "X-Forwarded-For" \
> + value "$REMOTE_ADDR"
> + match request tagged dav header set "Host" value "davhost.dmn.tld"
> + match request tagged dav header set "x-webobjects-server-protocol" \
> + value "HTTP/1.0"
> + match request tagged dav header set "x-webobjects-remote-host" \
> + value "127.0.0.1"
> + match request tagged dav header set "x-webobjects-server-name" \
> + value "davhost.dmn.tld"
> + match request tagged dav header set "x-webobjects-server-url" \
> + value "https://davhost.dmn.tld/"
> + match request tagged dav header set "x-webobjects-server-port" \
> + value "$SERVER_PORT"
> +
> + match request url log
> +
> + pass request method HEAD
> + pass request method GET
> + pass request method POST
> +
> + pass request tagged dav method PUT
> + pass request tagged dav method DELETE
> + pass request tagged dav method MKCOL
> + pass request tagged dav method MOVE
> + pass request tagged dav method OPTIONS
> + pass request tagged dav method PROPFIND
> + pass request tagged dav method REPORT
> +
> + tcp { nodelay, sack }
> +}
> +relay httpredir {
> + listen on 127.0.0.1 port http
> + listen on 127.0.0.1 port http tls
> + protocol httpproto
> + forward to <httpd> port 19000
> + forward to <sogo_app> port 20000
> + forward to <sogo_static> port 18000
> +}
> +
> +# mkdir -p ${VARBASE}/www/htdocs/sogo/SOGo.woa/WebServerResources
> +# cp -R ${TRUEPREFIX}/lib/GNUstep/SOGo/WebServerResources \
> + ${VARBASE}/www/htdocs/sogo/SOGo.woa/WebServerResources
> +
> +Edit /etc/httpd.conf
> +
> +# redirect from http to https
> +server davhost.dmn.tld {
> + listen on 127.0.0.1 port 19000
> + block return 301 "https://davhost.dmn.tld/SOGo/"
> +}
> +# serve other websites like this
> +server some.website.tld {
> + listen on 127.0.0.1 port 19000
> + root "/htdocs/somewebsite"
> +}
> +# serve sogo static content
> +server sogo {
> + listen on 127.0.0.1 port 18000
> + root "/htdocs/sogo"
> + directory no auto index
> +}
> +
> SOGo with nginx
> ===============
> Since nginx configuration is not explained in the SOGo Manual, here is an
> example.
>