Tôi đang cố gắng để SSI hoạt động trên Debian chạy Apache, tuy nhiên các .shtmltệp không được phân tích cú pháp. Từ một tệp PHP với phpinfo()tôi có thể thấy rằng phần sau hiển thị trong phần mô-đun được tải:
mod_mime_xattr mod_mime mod_mime_magic
Trong /etc/apache2/mods-enabled/mime.conftôi có (trong số những thứ khác):
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Trong /etc/apache2/sites-enabled/domain.com.conf(đối với máy chủ ảo trong câu hỏi) tôi có:
<Directory /home/username/public_html>
Options +Includes
allow from all
AllowOverride All 
</Directory>
và để có biện pháp tốt, tôi cũng đã thêm vào như sau:
<Directory />
Options +Includes
</directory>
Trong .htaccesstệp của người dùng , tôi đã thử thêm:
Options +Includes
AddType text/html shtml
AddHandler server-parsed shtml
Dường như không có gì để làm việc Làm thế nào tôi thậm chí có thể gỡ lỗi này?
Biên tập:
Đây là đầu ra của ls /etc/apache2/mods-enabled/trong trường hợp này giúp
actions.conf          dav_svn.load         proxy_balancer.load
actions.load          deflate.conf         proxy.conf
alias.conf            deflate.load         proxy_connect.load
alias.load            dir.conf             proxy_http.load
auth_basic.load       dir.load             proxy.load
auth_digest.load      env.load             python.load
authn_file.load       fcgid.conf           reqtimeout.conf
authz_default.load    fcgid.load           reqtimeout.load
authz_groupfile.load  mime.conf            rewrite.load
authz_host.load       mime.load            ruby.load
authz_user.load       mime_magic.conf      setenvif.conf
autoindex.conf        mime_magic.load      setenvif.load
autoindex.load        mime-xattr.load      ssl.conf
cgi.load              negotiation.conf     ssl.load
dav_fs.conf           negotiation.load     status.conf
dav_fs.load           php5.conf            status.load
dav.load              php5.load            suexec.load
dav_svn.conf          proxy_balancer.conf
          [error] an unknown filter was not added: includes
                AddOutputFilter INCLUDES .shtmlthoát khỏi lỗi, nhưng vẫn không giải quyết được vấn đề
                
.shtmltrang, bạn có thấy bất cứ điều gì trong nhật ký lỗi Apache không?