Apache尝试parsing我的* .tpl文件(其中包含js / html – 下划线模板)。 这是我根本不需要的东西。 所以,如果我将文件重命名为* .html,则内容按原样返回,如果该文件具有“tpl”扩展名,则会收到error handling的结果。
我通过添加行来解决问题
AddType text/plain .tpl
到configuration文件/etc/apache2/mods-enabled/mime.conf 。
但问题仍然是一样的 – 为什么orifinally文件被处理? 另外如果我明确指定
AddType application/octet-stream .tpl
文件也在处理中。 我不知道如何closures这种行为。 error.log / access.log(关于parsing错误)没有任何疑问。
这是Debian 7,Apache / 2.2.22(Debian)。 没有.htaccess 。 虚拟主机设置:
<Directory /> Options FollowSymLinks Indexes Order allow,deny allow from all AllowOverride all Header set Access-Control-Allow-Origin "*" </Directory>