[SOLVED] [APACHE] Missing Slash in Domain

Hi there,
im running Nextcloud in a docker container. Apache is installed on my Host system which redirects through proxy pass to the nextcloud docker. There is also a permanent redirect on SSL.

<VirtualHost *:80>
        ServerName nc.mydomain.de
        Redirect permanent /  https://nc.mydomain.de/
</VirtualHost>

<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerAdmin removed
        ServerName nc.mydomain.de
<IfModule mod_headers.c>
        Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
</IfModule>

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

         <Proxy *>
              Order deny,allow
              Allow from all
        </Proxy>

    ProxyPass / http://127.0.0.1:8080/
    ProxyPassReverse / http://127.0.0.1:8080/

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined

        Alias /doc/ "/usr/share/doc/"
        <Directory "/usr/share/doc/">
                Options Indexes MultiViews FollowSymLinks
                AllowOverride None
                Order deny,allow
                Deny from all
                Allow from 127.0.0.0/255.0.0.0 ::1/128
        </Directory>

    
        SSLEngine on      
        SSLCertificateFile    /etc/letsencrypt/live/nc.mydomain.de-0001/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/nc.mydomain.de-0001/privkey.pem


        <FilesMatch "\.(cgi|shtml|phtml|php)$">
                SSLOptions +StdEnvVars
        </FilesMatch>
        <Directory /usr/lib/cgi-bin>
                SSLOptions +StdEnvVars
        </Directory>

        
        BrowserMatch "MSIE [2-6]" \
                nokeepalive ssl-unclean-shutdown \
                downgrade-1.0 force-response-1.0
             BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
</IfModule>

When i type my url nc.mydomain.de it will redirect to:
"https://nc.mydomain.deindex.php/login"
The “/” is missing between the Domain an index.php

Anything wrong in the config?

Matti

The official apache doc puts the redirect in quotes (https://httpd.apache.org/docs/2.4/en/rewrite/avoid.html):

<VirtualHost *:80>
    ServerName www.example.com
    Redirect "/" "https://www.example.com/"
</VirtualHost>

Thank you tflidd
after waiting several days, the problem is solved.