Alias not working

Hello. I just setup seafile on windows + apache. Seafile is working fine. However, I would like to use https connection which I do with letsencrypt certificates generated by letsencrypt win-simple. The method I use to validate requires an alias to /.well-known and this works fine for all my other domains. However, I cannot get this alias to work within the domain I set up for seafile and I think it has to do with the way the virtual host gets setup for windows.

DocumentRoot “${SRVROOT}/htdocs”

Obiously, since seafile is working the alias /media works. But I can’t get /well-known to work.

Here is my virtual host:

<VirtualHost *:80>
    ServerName redacted.tld
    DocumentRoot "${SRVROOT}/htdocs"
	Alias /.well-known "C:/xampp/htdocs/.well-known"
    Alias /media "C:/seafile/seafile-server-6.0.7/seahub/media"

    RewriteEngine On

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

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

    #
    # seahub
    #
    SetEnvIf Request_URI . proxy-fcgi-pathinfo=unescape
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    ProxyPreserveHost On
    ProxyPass / fcgi://127.0.0.1:8000/
	
    ErrorLog "logs/redacted.tld-error.log"
    CustomLog "logs/redacted.tld-access.log" common

</VirtualHost>

Any help with this would be greatly appreciated. For the time being I can create a certificate manually (not using win-simple) and I have no way to automatically renew.

I fixed it using a workaround solution.

For *:80 I used a real folder as document root and created alias /.well-known.
For *:443 I used “${SRVROOT}/htdocs” as document root.

Then I placed a htaccess in the *:80 document root that rewrites to https. This allows direct HTTP links to the alias - which are only the validation links in /.well-known/acme-challenge - to be called without redirection to https but everything else gets redirected.

<VirtualHost *:80>
    ServerName redacted.tld
    DocumentRoot "C:/xampp/htdocs/redacted.tld"
	Alias /.well-known "C:/xampp/htdocs/.well-known"
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot "${SRVROOT}/htdocs"
	SSLEngine on
	SSLCertificateFile "C:\ProgramData\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\mycertificate-crt.pem"
	SSLCertificateKeyFile "C:\ProgramData\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\mycertificate-key.pem"
	SSLCertificateChainFile "C:\ProgramData\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\mycertificate-chain.pem"
    ServerName redacted.tld

    Alias /media  "C:/seafile/seafile-server-6.0.7/seahub/media"

    RewriteEngine On

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

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

    #
    # seahub
    #
    SetEnvIf Request_URI . proxy-fcgi-pathinfo=unescape
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    ProxyPreserveHost On
    ProxyPass / fcgi://127.0.0.1:8000/

    ErrorLog "logs/redacted.tld-error.log"
    CustomLog "logs/redacted.tld-access.log" common
</VirtualHost>

I hope this helps someone else. Certficate renewal automation is now working.