apache .gz gzip content handler for Linux documentation /usr/share/doc and localhost/doc/

前端 未结 2 1931
长情又很酷
长情又很酷 2021-02-03 14:32

How could I create a simple content handler for apache .gz gzip content. I want it to uncompress say http://localhost/doc/FAQ/Linux-FAQ.gz and send it to the browser as plain te

2条回答
  •  天涯浪人
    2021-02-03 14:53

    cat /etc/apache2/mods-enabled/mime.conf | head -n 30
    
    
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig /etc/mime.types
    
    #
    # AddType allows you to add to or override the MIME configuration
    # file mime.types for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    # Despite the name similarity, the following Add* directives have
    # nothing to do with the FancyIndexing customization directives above.
    #
    AddEncoding x-compress .Z
    AddEncoding x-gzip .gz .tgz
    AddEncoding x-bzip2 .bz2
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/x-bzip2 .bz2
    

提交回复
热议问题