2

I use the bash under Windows 10 with apache2 and php7 installed.

I set up a vhost for http://localhost mapped to a symbolic file which is linked to a physical windows directory. When I open the url, it infinitely appends /index.html/ to the url, regardless of which subdirectories I enter regardless of (existing) files in the url, like this:

http://localhost/pub/videos/viewsSimilarities_movie.mp4

leads to:

http://localhost/pub/videos/viewsSimilarities_movie.mp4/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/

and

http://localhost/pub/

leads to:

http://localhost/pub/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/

My /etc/apache2/sites-available/localhost.conf:

<VirtualHost *:80>

        ServerName localhost
        DocumentRoot /var/www/html
        DirectoryIndex index.html

        <Directory /var/www/html>
#               Options +Indexes +FollowSymLinks +MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                RewriteEngine Off
        </Directory>
        ErrorLog /var/log/apache2/localhost_error.log
        LogLevel debug
        CustomLog /var/log/apache2/localhost_access.log combined

# phpMyAdmin default Apache configuration
Alias /phpmyadmin /var/www/phpmyadmin
<Directory /var/www/phpmyadmin>
    Options FollowSymLinks
    DirectoryIndex index.php

    php_flag magic_quotes_gpc Off
    php_flag track_vars On
    php_flag register_globals Off
    php_value include_path .
</Directory>

</VirtualHost>

The Options line doesn't change anything.

Where can I look for the problem?

radonthetyrant
  • 183
  • 1
  • 6
  • The entry `DirectoryIndex index.html` belongs inside of ``. Also note that your Options are commented out (this is not causing the problem though). – Broco Sep 20 '16 at 15:05
  • As always start in your log files. Typically such is the result of incorrect rewrite rules, although you correctly have `AllowOverride None` you might still want to check for .htaccess files. – HBruijn Sep 20 '16 at 15:51
  • 1
    What's inside the index.html? There is nothing in that configuration that will cause such redirect. Try the same request with curl if you can use it like `curl -I http://localhost/pub/videos/viewsSimilarities_movie.mp4` and show the output. Also show the relevant access_log entries and error_log entries if any. – Daniel Ferradal Sep 22 '16 at 17:54

0 Answers0