我使用Windows 10下的bash,安装了apache2和php7。
我为http://本地主机映射到链接到物理 Windows 目录的符号文件。当我打开 URL 时,它会无限地将 /index.html/ 附加到 URL,无论我进入哪个子目录,无论 URL 中是否存在(现有)文件,如下所示:
http://localhost/pub/videos/viewsSimilarities_movie.mp4
导致:
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/
和
http://localhost/pub/
导致:
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/
我的/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>
选项行不会改变任何内容。
我应该去哪里查找问题?