问题原文
原帖链接 · Jeffrey Wen · CC BY-SA 3.0
System specs
- Mac OS Sierra
- Brew installed: Apache/2.4.23
When I access localhost/mypage.php => works
When I access localhost/mypage => does not work
My configuration
# /usr/local/etc/apache/2.4/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerName localhost
Redirect permanent / https://localhost/
</VirtualHost>
<VirtualHost *:443>
ServerName localhost
DocumentRoot "/Users/myuser/Documents/mywebsite/httpdocs"
DirectoryIndex index.php
<Directory "/Users/myuser/Documents/mywebsite/httpdocs">
Options +FollowSymLinks +MultiViews -Indexes
AllowOverride all
Require all granted
</Directory>
SSLProtocol -all +TLSv1.2
SSLHonorCipherOrder On
SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
SSLCertificateFile /usr/local/etc/apache2/2.4/ssl/localhost.crt
SSLCertificateKeyFile /usr/local/etc/apache2/2.4/ssl/server.key
</VirtualHost>
My troubleshooting
In the Options line, I have tried the following:
- Options +FollowSymLinks +MultiViews
- Options FollowSymLinks MultiViews
Yes, I did restart Apache.
已采纳解答
原帖链接 · Jeffrey Wen · CC BY-SA 3.0
Apparently, MultiViews relies on the negotiation module.
Mac's install Apache with the following module commented out by default!!
# LoadModule negotiation_module libexec/mod_negotiation.so
I simply uncommented it and reload Apache. Now it works!
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
