Nejčastěji kladené otázky/Obecné/036

    From The Document Foundation Wiki
    < Faq‎ | General
    This page is a translated version of the page Faq/General/036 and the translation is 100% complete.

    Jak nakonfigurovat typ MIME LibreOffice se serverem Apache?

    Pokud se setkáte s problémy při rozpoznávání souborů LibreOffice některými prohlížeči (například při pokusu o otevření souboru zip), zkontrolujte nastavení "Typů MIME".

    Pokud soubor mime.types (jehož cesta je definována v souboru httpd.conf) ještě neobsahuje definice vnd.oasis.opendocument, nedoporučujeme je přidávat přímo do tohoto souboru (který by mohl být v budoucí aktualizaci Apache přepsán), ale do konfiguračního souboru httpd.conf Apache.

    Tento soubor se obvykle nachází v adresáři:

    • /etc/httpd/conf nebo /etc/apache/ na linuxovém serveru.
    • [ProgramInstallation]\ apache\conf na počítači s Windows

    Přidejte následující řádky do sekce <IfModule mod_mime.c> souboru httpd.conf :

     # <add LibreOffice> - source: https://wiki.documentfoundation.org/Faq/General/036
     # Declaration of MIME types for documents in ODF format:
    AddType application/vnd.oasis.opendocument.text .odt
    AddType application/vnd.oasis.opendocument.text-template .ott
    AddType application/vnd.oasis.opendocument.text-web .oth
    AddType application/vnd.oasis.opendocument.text-master .odm
    AddType application/vnd.oasis.opendocument.spreadsheet .ods
    AddType application/vnd.oasis.opendocument.spreadsheet-template .ots
    AddType application/vnd.oasis.opendocument.chart .odc
    AddType application/vnd.oasis.opendocument.presentation .odp
    AddType application/vnd.oasis.opendocument.presentation-template .otp
    AddType application/vnd.oasis.opendocument.graphics .odg
    AddType application/vnd.oasis.opendocument.graphics-template .otg
    AddType application/vnd.oasis.opendocument.formula .odf
    AddType application/vnd.oasis.opendocument.database .odb
    AddType application/vnd.oasis.opendocument.image .odi
     # for managing extensions:
    AddType application/vnd.openofficeorg.extension oxt
     # </Add LibreOffice>
    

    Nezapomeňte znovu spustit server Apache, aby byly změny aktivní.