URL rewrite issue. sf.domain.tld/seafdav turns in to sf.domain.tldseafdav

When I try to visit sf.domain.tld/seafdav it turns into sf.domain.tldseafdav

My vhost.conf:

<VirtualHost *:80>
ServerName sf.domain.tld
ServerAlias sf.domain.tld2
DocumentRoot /var/www

Redirect permanent / https://sf.domain.tld

ErrorLog ${APACHE_LOG_DIR}/sf_error.log
CustomLog ${APACHE_LOG_DIR}/sf_access.log combined
</VirtualHost>

<VirtualHost *:443>
ServerName sf.domain.tld
ServerAlias sf.domain.tld2

DocumentRoot /var/www
Alias /media  /usr/share/seafile/[company name]/seafile-server-latest/seahub/media

RewriteEngine On

<Location /media>
    Require all granted
</Location>

#
# seafile fileserver
#
ProxyPass /seafhttp http://127.0.0.1:[seafile server port]
ProxyPassReverse /seafhttp http://127.0.0.1:[seafile server port]
RewriteRule ^/seafhttp - [QSA,L]


#
# WebDAV
# We use http proxy, since SeafDAV is incompatible with FCGI proxy in Apache 2.4.
#
ProxyPass /seafdav http://127.0.0.1:[webdav port]/seafdav
ProxyPassReverse /seafdav http://127.0.0.1:[webdav port]/seafdav

#
# seahub
#
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/

Include /etc/letsencrypt/SA1.conf

ErrorLog ${APACHE_LOG_DIR}/sf_ssl_error.log
CustomLog ${APACHE_LOG_DIR}/sf_ssl_access.log combined
# WebDAV
# seafile fileserver
# seahub

Reordering the them in conf file solved my issue!

Very interesting. I would not have guessed that order mattered.

Is this Apache or Seafile? Do you see issues in the logs?

I think this is purely issue with server (apache in my case). I did not thoroughly check the logs but I did not see any; it makes sense it’s nothing to do with seafile, the server needed to be configured properly.