Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #</Directory>
- #
- # DirectoryIndex: sets the file that Apache will serve if a directory
- # is requested.
- #
- # The index.html.var file (a type-map) is used to deliver content-
- # negotiated documents. The MultiViews Option can be used for the
- # same purpose, but it is much slower.
- #
- DirectoryIndex index.html index.html.var
- #
- # AccessFileName: The name of the file to look for in each directory
- # for additional configuration directives. See also the AllowOverride
- # directive.
- #
- AccessFileName .htaccess
- #
- # The following lines prevent .htaccess and .htpasswd files from being
- # viewed by Web clients.
- #
- <Files ~ "^\.ht">
- Order allow,deny
- Deny from all
- Satisfy All
- </Files>
- #
- # TypesConfig describes where the mime.types file (or equivalent) is
- # to be found.
- #
- TypesConfig /etc/mime.types
- #
- # DefaultType is the default MIME type the server will use for a document
- # if it cannot otherwise determine one, such as from filename extensions.
- # If your server contains mostly text or HTML documents, "text/plain" is
- # a good value. If most of your content is binary, such as applications
- # or images, you may want to use "application/octet-stream" instead to
- # keep browsers from trying to display binary files as though they are
- # text.
- #
- DefaultType text/plain
- #
- # The mod_mime_magic module allows the server to use various hints from the
- # contents of the file itself to determine its type. The MIMEMagicFile
- # directive tells the module where the hint definitions are located.
- #
- <IfModule mod_mime_magic.c>
- # MIMEMagicFile /usr/share/magic.mime
- MIMEMagicFile conf/magic
- </IfModule>
- #
- # HostnameLookups: Log the names of clients or just their IP addresses
- # e.g., www.apache.org (on) or 204.62.129.132 (off).
- # The default is off because it'd be overall better for the net if people
- # had to knowingly turn this feature on, since enabling it means that
- # each client request will result in AT LEAST one lookup request to the
- # nameserver.
- #
- HostnameLookups Off
- #
- # EnableMMAP: Control whether memory-mapping is used to deliver
- # files (assuming that the underlying OS supports it).
- # The default is on; turn this off if you serve from NFS-mounted
- # filesystems. On some systems, turning it off (regardless of
- # filesystem) can improve performance; for details, please see
- # http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap
- #
- #EnableMMAP off
- #
- # EnableSendfile: Control whether the sendfile kernel support is
- # used to deliver files (assuming that the OS supports it).
- # The default is on; turn this off if you serve from NFS-mounted
- # filesystems. Please see
- # http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile
- #
- #EnableSendfile off
- #
- # ErrorLog: The location of the error log file.
- # If you do not specify an ErrorLog directive within a <VirtualHost>
- # container, error messages relating to that virtual host will be
- # logged here. If you *do* define an error logfile for a <VirtualHost>
- # container, that host's errors will be logged there and not here.
- #
- ErrorLog logs/error_log
- #
- # LogLevel: Control the number of messages logged to the error_log.
- # Possible values include: debug, info, notice, warn, error, crit,
- # alert, emerg.
- #
- LogLevel warn
- #
- # The following directives define some format nicknames for use with
- # a CustomLog directive (see below).
- #
- LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
- LogFormat "%h %l %u %t \"%r\" %>s %b" common
- LogFormat "%{Referer}i -> %U" referer
- LogFormat "%{User-agent}i" agent
- # "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this
- # requires the mod_logio module to be loaded.
- #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
- #
- # The location and format of the access logfile (Common Logfile Format).
- # If you do not define any access logfiles within a <VirtualHost>
- # container, they will be logged here. Contrariwise, if you *do*
- # define per-<VirtualHost> access logfiles, transactions will be
- # logged therein and *not* in this file.
- #
- #CustomLog logs/access_log common
- #
- # If you would like to have separate agent and referer logfiles, uncomment
- # the following directives.
- #
- #CustomLog logs/referer_log referer
- #CustomLog logs/agent_log agent
- #
- # For a single logfile with access, agent, and referer information
- # (Combined Logfile Format), use the following directive:
- #
- CustomLog logs/access_log combined
- #
- # Optionally add a line containing the server version and virtual host
- # name to server-generated pages (internal error documents, FTP directory
- # listings, mod_status and mod_info output etc., but not CGI generated
- # documents or custom error documents).
- # Set to "EMail" to also include a mailto: link to the ServerAdmin.
- # Set to one of: On | Off | EMail
- #
- ServerSignature On
- #
- # Aliases: Add here as many aliases as you need (with no limit). The format is
- # Alias fakename realname
- #
- # Note that if you include a trailing / on fakename then the server will
- # require it to be present in the URL. So "/icons" isn't aliased in this
- # example, only "/icons/". If the fakename is slash-terminated, then the
- # realname must also be slash terminated, and if the fakename omits the
- # trailing slash, the realname must also omit it.
- #
- # We include the /icons/ alias for FancyIndexed directory listings. If you
- # do not use FancyIndexing, you may comment this out.
- #
- Alias /icons/ "/var/www/icons/"
- <Directory "/var/www/icons">
- Options Indexes MultiViews FollowSymLinks
- AllowOverride None
- Order allow,deny
- Allow from all
- </Directory>
- #
- # WebDAV module configuration section.
- #
- <IfModule mod_dav_fs.c>
- # Location of the WebDAV lock database.
- DAVLockDB /var/lib/dav/lockdb
- </IfModule>
- #
- # ScriptAlias: This controls which directories contain server scripts.
- # ScriptAliases are essentially the same as Aliases, except that
- # documents in the realname directory are treated as applications and
- # run by the server when requested rather than as documents sent to the client.
- # The same rules about trailing "/" apply to ScriptAlias directives as to
- # Alias.
- #
- ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
- #
- # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
- # CGI directory exists, if you have that configured.
- #
- <Directory "/var/www/cgi-bin">
- AllowOverride None
- Options None
- Order allow,deny
- Allow from all
- </Directory>
- #
- # Redirect allows you to tell clients about documents which used to exist in
- # your server's namespace, but do not anymore. This allows you to tell the
- # clients where to look for the relocated document.
- # Example:
- # Redirect permanent /foo http://www.example.com/bar
- #
- # Directives controlling the display of server-generated directory listings.
- #
- #
- # IndexOptions: Controls the appearance of server-generated directory
- # listings.
- #
- IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8
- #
- # AddIcon* directives tell the server which icon to show for different
- # files or filename extensions. These are only displayed for
- # FancyIndexed directories.
- #
- AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
- AddIconByType (TXT,/icons/text.gif) text/*
- AddIconByType (IMG,/icons/image2.gif) image/*
- AddIconByType (SND,/icons/sound2.gif) audio/*
- AddIconByType (VID,/icons/movie.gif) video/*
- AddIcon /icons/binary.gif .bin .exe
- AddIcon /icons/binhex.gif .hqx
- AddIcon /icons/tar.gif .tar
- AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
- AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
- AddIcon /icons/a.gif .ps .ai .eps
- AddIcon /icons/layout.gif .html .shtml .htm .pdf
- AddIcon /icons/text.gif .txt
- AddIcon /icons/c.gif .c
- AddIcon /icons/p.gif .pl .py
- AddIcon /icons/f.gif .for
- AddIcon /icons/dvi.gif .dvi
- AddIcon /icons/uuencoded.gif .uu
- AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
- AddIcon /icons/tex.gif .tex
- AddIcon /icons/bomb.gif /core
- AddIcon /icons/back.gif ..
- AddIcon /icons/hand.right.gif README
- AddIcon /icons/folder.gif ^^DIRECTORY^^
- AddIcon /icons/blank.gif ^^BLANKICON^^
- #
- # DefaultIcon is which icon to show for files which do not have an icon
- # explicitly set.
- #
- DefaultIcon /icons/unknown.gif
- #
- # AddDescription allows you to place a short description after a file in
- # server-generated indexes. These are only displayed for FancyIndexed
- # directories.
- # Format: AddDescription "description" filename
- #
- #AddDescription "GZIP compressed document" .gz
- #AddDescription "tar archive" .tar
- #AddDescription "GZIP compressed tar archive" .tgz
- #
- # ReadmeName is the name of the README file the server will look for by
- # default, and append to directory listings.
- #
- # HeaderName is the name of a file which should be prepended to
- # directory indexes.
- ReadmeName README.html
- HeaderName HEADER.html
- #
- # IndexIgnore is a set of filenames which directory indexing should ignore
- # and not include in the listing. Shell-style wildcarding is permitted.
- #
- IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
- #
- # DefaultLanguage and AddLanguage allows you to specify the language of
- # a document. You can then use content negotiation to give a browser a
- # file in a language the user can understand.
- #
- # Specify a default language. This means that all data
- # going out without a specific language tag (see below) will
- # be marked with this one. You probably do NOT want to set
- # this unless you are sure it is correct for all cases.
- #
- # * It is generally better to not mark a page as
- # * being a certain language than marking it with the wrong
- # * language!
- #
- # DefaultLanguage nl
- #
- # Note 1: The suffix does not have to be the same as the language
- # keyword --- those with documents in Polish (whose net-standard
- # language code is pl) may wish to use "AddLanguage pl .po" to
- # avoid the ambiguity with the common suffix for perl scripts.
- #
- # Note 2: The example entries below illustrate that in some cases
- # the two character 'Language' abbreviation is not identical to
- # the two character 'Country' code for its country,
- # E.g. 'Danmark/dk' versus 'Danish/da'.
- #
- # Note 3: In the case of 'ltz' we violate the RFC by using a three char
- # specifier. There is 'work in progress' to fix this and get
- # the reference data for rfc1766 cleaned up.
- #
- # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
- # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
- # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
- # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
- # Norwegian (no) - Polish (pl) - Portugese (pt)
- # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
- # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
- #
- AddLanguage ca .ca
- AddLanguage cs .cz .cs
- AddLanguage da .dk
- AddLanguage de .de
- AddLanguage el .el
- AddLanguage en .en
- AddLanguage eo .eo
- AddLanguage es .es
- AddLanguage et .et
- AddLanguage fr .fr
- AddLanguage he .he
- AddLanguage hr .hr
- AddLanguage it .it
- AddLanguage ja .ja
- AddLanguage ko .ko
- AddLanguage ltz .ltz
- AddLanguage nl .nl
- AddLanguage nn .nn
- AddLanguage no .no
- AddLanguage pl .po
- AddLanguage pt .pt
- AddLanguage pt-BR .pt-br
- AddLanguage ru .ru
- AddLanguage sv .sv
- AddLanguage zh-CN .zh-cn
- AddLanguage zh-TW .zh-tw
- #
- # LanguagePriority allows you to give precedence to some languages
- # in case of a tie during content negotiation.
- #
- # Just list the languages in decreasing order of preference. We have
- # more or less alphabetized them here. You probably want to change this.
- #
- LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
- #
- # ForceLanguagePriority allows you to serve a result page rather than
- # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
- # [in case no accepted languages matched the available variants]
- #
- ForceLanguagePriority Prefer Fallback
- #
- # Specify a default charset for all content served; this enables
- # interpretation of all content as UTF-8 by default. To use the
- # default browser choice (ISO-8859-1), or to allow the META tags
- # in HTML content to override this choice, comment out this
- # directive:
- #
- AddDefaultCharset UTF-8
- #
- # AddType allows you to add to or override the MIME configuration
- # file mime.types for specific file types.
- #
- #AddType application/x-tar .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
- # 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
- #
- # MIME-types for downloading Certificates and CRLs
- #
- AddType application/x-x509-ca-cert .crt
- AddType application/x-pkcs7-crl .crl
- #
- # AddHandler allows you to map certain file extensions to "handlers":
- # actions unrelated to filetype. These can be either built into the server
- # or added with the Action directive (see below)
- #
- # To use CGI scripts outside of ScriptAliased directories:
- # (You will also need to add "ExecCGI" to the "Options" directive.)
- #
- #AddHandler cgi-script .cgi
- #
- # For files that include their own HTTP headers:
- #
- #AddHandler send-as-is asis
- #
- # For type maps (negotiated resources):
- # (This is enabled by default to allow the Apache "It Worked" page
- # to be distributed in multiple languages.)
- #
- AddHandler type-map var
- #
- # Filters allow you to process content before it is sent to the client.
- #
- # To parse .shtml files for server-side includes (SSI):
- # (You will also need to add "Includes" to the "Options" directive.)
- #
- AddType text/html .shtml
- AddOutputFilter INCLUDES .shtml
- #
- # Action lets you define media types that will execute a script whenever
- # a matching file is called. This eliminates the need for repeated URL
- # pathnames for oft-used CGI file processors.
- # Format: Action media/type /cgi-script/location
- # Format: Action handler-name /cgi-script/location
- #
- #
- # Customizable error responses come in three flavors:
- # 1) plain text 2) local redirects 3) external redirects
- #
- # Some examples:
- #ErrorDocument 500 "The server made a boo boo."
- #ErrorDocument 404 /missing.html
- #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
- #ErrorDocument 402 http://www.example.com/subscription_info.html
- #
- #
- # Putting this all together, we can internationalize error responses.
- #
- # We use Alias to redirect any /error/HTTP_<error>.html.var response to
- # our collection of by-error message multi-language collections. We use
- # includes to substitute the appropriate text.
- #
- # You can modify the messages' appearance without changing any of the
- # default HTTP_<error>.html.var files by adding the line:
- #
- # Alias /error/include/ "/your/include/path/"
- #
- # which allows you to create your own set of files by starting with the
- # /var/www/error/include/ files and
- # copying them to /your/include/path/, even on a per-VirtualHost basis.
- #
- Alias /error/ "/var/www/error/"
- <IfModule mod_negotiation.c>
- <IfModule mod_include.c>
- <Directory "/var/www/error">
- AllowOverride All
- Options IncludesNoExec
- AddOutputFilter Includes html
- AddHandler type-map var
- Order allow,deny
- Allow from all
- LanguagePriority en es de fr
- ForceLanguagePriority Prefer Fallback
- </Directory>
- # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
- # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
- # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
- # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
- # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
- # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
- # ErrorDocument 410 /error/HTTP_GONE.html.var
- # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
- # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
- # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
- # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
- # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
- # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
- # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
- # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
- # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
- # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
- </IfModule>
- </IfModule>
- #
- # The following directives modify normal HTTP response behavior to
- # handle known problems with browser implementations.
- #
- BrowserMatch "Mozilla/2" nokeepalive
- BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
- BrowserMatch "RealPlayer 4\.0" force-response-1.0
- BrowserMatch "Java/1\.0" force-response-1.0
- BrowserMatch "JDK/1\.0" force-response-1.0
- #
- # The following directive disables redirects on non-GET requests for
- # a directory that does not include the trailing slash. This fixes a
- # problem with Microsoft WebFolders which does not appropriately handle
- # redirects for folders with DAV methods.
- # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
- #
- BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
- BrowserMatch "MS FrontPage" redirect-carefully
- BrowserMatch "^WebDrive" redirect-carefully
- BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
- BrowserMatch "^gnome-vfs/1.0" redirect-carefully
- BrowserMatch "^XML Spy" redirect-carefully
- BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
- #
- # Allow server status reports generated by mod_status,
- # with the URL of http://servername/server-status
- # Change the ".example.com" to match your domain to enable.
- #
- #<Location /server-status>
- # SetHandler server-status
- # Order deny,allow
- # Deny from all
- # Allow from .example.com
- #</Location>
- #
- # Allow remote server configuration reports, with the URL of
- # http://servername/server-info (requires that mod_info.c be loaded).
- # Change the ".example.com" to match your domain to enable.
- #
- #<Location /server-info>
- # SetHandler server-info
- # Order deny,allow
- # Deny from all
- # Allow from .example.com
- #</Location>
- #
- # Proxy Server directives. Uncomment the following lines to
- # enable the proxy server:
- #
- #<IfModule mod_proxy.c>
- #ProxyRequests On
- #
- #<Proxy *>
- # Order deny,allow
- # Deny from all
- # Allow from .example.com
- #</Proxy>
- #
- # Enable/disable the handling of HTTP/1.1 "Via:" headers.
- # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
- # Set to one of: Off | On | Full | Block
- #
- #ProxyVia On
- #
- # To enable a cache of proxied content, uncomment the following lines.
- # See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
- #
- #<IfModule mod_disk_cache.c>
- # CacheEnable disk /
- # CacheRoot "/var/cache/mod_proxy"
- #</IfModule>
- #
- #</IfModule>
- # End of proxy directives.
- ### Section 3: Virtual Hosts
- #
- # VirtualHost: If you want to maintain multiple domains/hostnames on your
- # machine you can setup VirtualHost containers for them. Most configurations
- # use only name-based virtual hosts so the server doesn't need to worry about
- # IP addresses. This is indicated by the asterisks in the directives below.
- #
- # Please see the documentation at
- # <URL:http://httpd.apache.org/docs/2.2/vhosts/>
- # for further details before you try to setup virtual hosts.
- #
- # You may use the command line option '-S' to verify your virtual host
- # configuration.
- #
- # Use name-based virtual hosting.
- #
- #NameVirtualHost *:80
- #
- # NOTE: NameVirtualHost cannot be used without a port specifier
- # (e.g. :80) if mod_ssl is being used, due to the nature of the
- # SSL protocol.
- #
- #
- # VirtualHost example:
- # Almost any Apache directive may go into a VirtualHost container.
- # The first VirtualHost section is used for requests without a known
- # server name.
- #
- #<VirtualHost *:80>
- # ServerAdmin webmaster@dummy-host.example.com
- # DocumentRoot /www/docs/dummy-host.example.com
- # ServerName dummy-host.example.com
- # ErrorLog logs/dummy-host.example.com-error_log
- # CustomLog logs/dummy-host.example.com-access_log common
- #</VirtualHost>
- <IfModule mpm_prefork_module>
- StartServers 12
- MinSpareServers 60
- MaxSpareServers 120
- MaxClients 256
- MaxRequestsPerChild 4500
- </IfModule>
- <IfModule mod_ssl.c>
- Listen 443
- NameVirtualHost *:443
- </IfModule>
- Include /etc/httpd/conf/httpd-le-ssl.conf
- ==> /etc/httpd/conf/httpd-le-ssl.conf <==
- <IfModule mod_ssl.c>
- <VirtualHost *:443>
- DocumentRoot "/var/www/html"
- ServerName www.eu-r.com
- # Other directives here
- SSLCertificateFile /etc/letsencrypt/live/www.eu-r.com/cert.pem
- SSLCertificateKeyFile /etc/letsencrypt/live/www.eu-r.com/privkey.pem
- Include /etc/letsencrypt/options-ssl-apache.conf
- SSLCertificateChainFile /etc/letsencrypt/live/www.eu-r.com/chain.pem
- </VirtualHost>
- </IfModule>
- ==> /etc/httpd/conf/magic <==
- # Magic data for mod_mime_magic Apache module (originally for file(1) command)
- # The module is described in /manual/mod/mod_mime_magic.html
- #
- # The format is 4-5 columns:
- # Column #1: byte number to begin checking from, ">" indicates continuation
- # Column #2: type of data to match
- # Column #3: contents of data to match
- # Column #4: MIME type of result
- # Column #5: MIME encoding of result (optional)
- #------------------------------------------------------------------------------
- # Localstuff: file(1) magic for locally observed files
- # Add any locally observed files here.
- #------------------------------------------------------------------------------
- # end local stuff
- #------------------------------------------------------------------------------
- #------------------------------------------------------------------------------
- # Java
- 0 short 0xcafe
- >2 short 0xbabe application/java
- #------------------------------------------------------------------------------
- # audio: file(1) magic for sound formats
- #
- # from Jan Nicolai Langfeldt <janl@ifi.uio.no>,
- #
- # Sun/NeXT audio data
- 0 string .snd
- >12 belong 1 audio/basic
- >12 belong 2 audio/basic
- >12 belong 3 audio/basic
- >12 belong 4 audio/basic
- >12 belong 5 audio/basic
- >12 belong 6 audio/basic
- >12 belong 7 audio/basic
- >12 belong 23 audio/x-adpcm
- # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
- # that uses little-endian encoding and has a different magic number
- # (0x0064732E in little-endian encoding).
- 0 lelong 0x0064732E
- >12 lelong 1 audio/x-dec-basic
- >12 lelong 2 audio/x-dec-basic
- >12 lelong 3 audio/x-dec-basic
- >12 lelong 4 audio/x-dec-basic
- >12 lelong 5 audio/x-dec-basic
- >12 lelong 6 audio/x-dec-basic
- >12 lelong 7 audio/x-dec-basic
- # compressed (G.721 ADPCM)
- >12 lelong 23 audio/x-dec-adpcm
- # Bytes 0-3 of AIFF, AIFF-C, & 8SVX audio files are "FORM"
- # AIFF audio data
- 8 string AIFF audio/x-aiff
- # AIFF-C audio data
- 8 string AIFC audio/x-aiff
- # IFF/8SVX audio data
- 8 string 8SVX audio/x-aiff
- # Creative Labs AUDIO stuff
- # Standard MIDI data
- 0 string MThd audio/unknown
- #>9 byte >0 (format %d)
- #>11 byte >1 using %d channels
- # Creative Music (CMF) data
- 0 string CTMF audio/unknown
- # SoundBlaster instrument data
- 0 string SBI audio/unknown
- # Creative Labs voice data
- 0 string Creative\ Voice\ File audio/unknown
- ## is this next line right? it came this way...
- #>19 byte 0x1A
- #>23 byte >0 - version %d
- #>22 byte >0 \b.%d
- # [GRR 950115: is this also Creative Labs? Guessing that first line
- # should be string instead of unknown-endian long...]
- #0 long 0x4e54524b MultiTrack sound data
- #0 string NTRK MultiTrack sound data
- #>4 long x - version %ld
- # Microsoft WAVE format (*.wav)
- # [GRR 950115: probably all of the shorts and longs should be leshort/lelong]
- # Microsoft RIFF
- 0 string RIFF audio/unknown
- # - WAVE format
- >8 string WAVE audio/x-wav
- # MPEG audio.
- 0 beshort&0xfff0 0xfff0 audio/mpeg
- # C64 SID Music files, from Linus Walleij <triad@df.lth.se>
- 0 string PSID audio/prs.sid
- #------------------------------------------------------------------------------
- # c-lang: file(1) magic for C programs or various scripts
- #
- # XPM icons (Greg Roelofs, newt@uchicago.edu)
- # ideally should go into "images", but entries below would tag XPM as C source
- 0 string /*\ XPM image/x-xbm 7bit
- # this first will upset you if you're a PL/1 shop... (are there any left?)
- # in which case rm it; ascmagic will catch real C programs
- # C or REXX program text
- 0 string /* text/plain
- # C++ program text
- 0 string // text/plain
- #------------------------------------------------------------------------------
- # compress: file(1) magic for pure-compression formats (no archives)
- #
- # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, whap, etc.
- #
- # Formats for various forms of compressed data
- # Formats for "compress" proper have been moved into "compress.c",
- # because it tries to uncompress it to figure out what's inside.
- # standard unix compress
- 0 string \037\235 application/octet-stream x-compress
- # gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver)
- 0 string \037\213 application/octet-stream x-gzip
- # According to gzip.h, this is the correct byte order for packed data.
- 0 string \037\036 application/octet-stream
- #
- # This magic number is byte-order-independent.
- #
- 0 short 017437 application/octet-stream
- # XXX - why *two* entries for "compacted data", one of which is
- # byte-order independent, and one of which is byte-order dependent?
- #
- # compacted data
- 0 short 0x1fff application/octet-stream
- 0 string \377\037 application/octet-stream
- # huf output
- 0 short 0145405 application/octet-stream
- # Squeeze and Crunch...
- # These numbers were gleaned from the Unix versions of the programs to
- # handle these formats. Note that I can only uncrunch, not crunch, and
- # I didn't have a crunched file handy, so the crunch number is untested.
- # Keith Waclena <keith@cerberus.uchicago.edu>
- #0 leshort 0x76FF squeezed data (CP/M, DOS)
- #0 leshort 0x76FE crunched data (CP/M, DOS)
- # Freeze
- #0 string \037\237 Frozen file 2.1
- #0 string \037\236 Frozen file 1.0 (or gzip 0.5)
- # lzh?
- #0 string \037\240 LZH compressed data
- #------------------------------------------------------------------------------
- # frame: file(1) magic for FrameMaker files
- #
- # This stuff came on a FrameMaker demo tape, most of which is
- # copyright, but this file is "published" as witness the following:
- #
- 0 string \<MakerFile application/x-frame
- 0 string \<MIFFile application/x-frame
- 0 string \<MakerDictionary application/x-frame
- 0 string \<MakerScreenFon application/x-frame
- 0 string \<MML application/x-frame
- 0 string \<Book application/x-frame
- 0 string \<Maker application/x-frame
- #------------------------------------------------------------------------------
- # html: file(1) magic for HTML (HyperText Markup Language) docs
- #
- # from Daniel Quinlan <quinlan@yggdrasil.com>
- # and Anna Shergold <anna@inext.co.uk>
- #
- 0 string \<!DOCTYPE\ HTML text/html
- 0 string \<!doctype\ html text/html
- 0 string \<HEAD text/html
- 0 string \<head text/html
- 0 string \<TITLE text/html
- 0 string \<title text/html
- 0 string \<html text/html
- 0 string \<HTML text/html
- 0 string \<!-- text/html
- 0 string \<h1 text/html
- 0 string \<H1 text/html
- # XML eXtensible Markup Language, from Linus Walleij <triad@df.lth.se>
- 0 string \<?xml text/xml
- #------------------------------------------------------------------------------
- # images: file(1) magic for image formats (see also "c-lang" for XPM bitmaps)
- #
- # originally from jef@helios.ee.lbl.gov (Jef Poskanzer),
- # additions by janl@ifi.uio.no as well as others. Jan also suggested
- # merging several one- and two-line files into here.
- #
- # XXX - byte order for GIF and TIFF fields?
- # [GRR: TIFF allows both byte orders; GIF is probably little-endian]
- #
- # [GRR: what the hell is this doing in here?]
- #0 string xbtoa btoa'd file
- # PBMPLUS
- # PBM file
- 0 string P1 image/x-portable-bitmap 7bit
- # PGM file
- 0 string P2 image/x-portable-greymap 7bit
- # PPM file
- 0 string P3 image/x-portable-pixmap 7bit
- # PBM "rawbits" file
- 0 string P4 image/x-portable-bitmap
- # PGM "rawbits" file
- 0 string P5 image/x-portable-greymap
- # PPM "rawbits" file
- 0 string P6 image/x-portable-pixmap
- # NIFF (Navy Interchange File Format, a modification of TIFF)
- # [GRR: this *must* go before TIFF]
- 0 string IIN1 image/x-niff
- # TIFF and friends
- # TIFF file, big-endian
- 0 string MM image/tiff
- # TIFF file, little-endian
- 0 string II image/tiff
- # possible GIF replacements; none yet released!
- # (Greg Roelofs, newt@uchicago.edu)
- #
- # GRR 950115: this was mine ("Zip GIF"):
- # ZIF image (GIF+deflate alpha)
- 0 string GIF94z image/unknown
- #
- # GRR 950115: this is Jeremy Wohl's Free Graphics Format (better):
- # FGF image (GIF+deflate beta)
- 0 string FGF95a image/unknown
- #
- # GRR 950115: this is Thomas Boutell's Portable Bitmap Format proposal
- # (best; not yet implemented):
- # PBF image (deflate compression)
- 0 string PBF image/unknown
- # GIF
- 0 string GIF image/gif
- # JPEG images
- 0 beshort 0xffd8 image/jpeg
- # PC bitmaps (OS/2, Windoze BMP files) (Greg Roelofs, newt@uchicago.edu)
- 0 string BM image/bmp
- #>14 byte 12 (OS/2 1.x format)
- #>14 byte 64 (OS/2 2.x format)
- #>14 byte 40 (Windows 3.x format)
- #0 string IC icon
- #0 string PI pointer
- #0 string CI color icon
- #0 string CP color pointer
- #0 string BA bitmap array
- #------------------------------------------------------------------------------
- # lisp: file(1) magic for lisp programs
- #
- # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com)
- 0 string ;; text/plain 8bit
- # Emacs 18 - this is always correct, but not very magical.
- 0 string \012( application/x-elc
- # Emacs 19
- 0 string ;ELC\023\000\000\000 application/x-elc
- #------------------------------------------------------------------------------
- # mail.news: file(1) magic for mail and news
- #
- # There are tests to ascmagic.c to cope with mail and news.
- 0 string Relay-Version: message/rfc822 7bit
- 0 string #!\ rnews message/rfc822 7bit
- 0 string N#!\ rnews message/rfc822 7bit
- 0 string Forward\ to message/rfc822 7bit
- 0 string Pipe\ to message/rfc822 7bit
- 0 string Return-Path: message/rfc822 7bit
- 0 string Path: message/news 8bit
- 0 string Xref: message/news 8bit
- 0 string From: message/rfc822 7bit
- 0 string Article message/news 8bit
- #------------------------------------------------------------------------------
- # msword: file(1) magic for MS Word files
- #
- # Contributor claims:
- # Reversed-engineered MS Word magic numbers
- #
- 0 string \376\067\0\043 application/msword
- 0 string \333\245-\0\0\0 application/msword
- # disable this one because it applies also to other
- # Office/OLE documents for which msword is not correct. See PR#2608.
- #0 string \320\317\021\340\241\261 application/msword
- #------------------------------------------------------------------------------
- # printer: file(1) magic for printer-formatted files
- #
- # PostScript
- 0 string %! application/postscript
- 0 string \004%! application/postscript
- # Acrobat
- # (due to clamen@cs.cmu.edu)
- 0 string %PDF- application/pdf
- #------------------------------------------------------------------------------
- # sc: file(1) magic for "sc" spreadsheet
- #
- 38 string Spreadsheet application/x-sc
- #------------------------------------------------------------------------------
- # tex: file(1) magic for TeX files
- #
- # XXX - needs byte-endian stuff (big-endian and little-endian DVI?)
- #
- # From <conklin@talisman.kaleida.com>
- # Although we may know the offset of certain text fields in TeX DVI
- # and font files, we can't use them reliably because they are not
- # zero terminated. [but we do anyway, christos]
- 0 string \367\002 application/x-dvi
- #0 string \367\203 TeX generic font data
- #0 string \367\131 TeX packed font data
- #0 string \367\312 TeX virtual font data
- #0 string This\ is\ TeX, TeX transcript text
- #0 string This\ is\ METAFONT, METAFONT transcript text
- # There is no way to detect TeX Font Metric (*.tfm) files without
- # breaking them apart and reading the data. The following patterns
- # match most *.tfm files generated by METAFONT or afm2tfm.
- #2 string \000\021 TeX font metric data
- #2 string \000\022 TeX font metric data
- #>34 string >\0 (%s)
- # Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
- #0 string \\input\ texinfo Texinfo source text
- #0 string This\ is\ Info\ file GNU Info text
- # correct TeX magic for Linux (and maybe more)
- # from Peter Tobias (tobias@server.et-inf.fho-emden.de)
- #
- 0 leshort 0x02f7 application/x-dvi
- # RTF - Rich Text Format
- 0 string {\\rtf application/rtf
- #------------------------------------------------------------------------------
- # animation: file(1) magic for animation/movie formats
- #
- # animation formats, originally from vax@ccwf.cc.utexas.edu (VaX#n8)
- # MPEG file
- 0 string \000\000\001\263 video/mpeg
- #
- # The contributor claims:
- # I couldn't find a real magic number for these, however, this
- # -appears- to work. Note that it might catch other files, too,
- # so BE CAREFUL!
- #
- # Note that title and author appear in the two 20-byte chunks
- # at decimal offsets 2 and 22, respectively, but they are XOR'ed with
- # 255 (hex FF)! DL format SUCKS BIG ROCKS.
- #
- # DL file version 1 , medium format (160x100, 4 images/screen)
- 0 byte 1 video/unknown
- 0 byte 2 video/unknown
- # Quicktime video, from Linus Walleij <triad@df.lth.se>
- # from Apple quicktime file format documentation.
- 4 string moov video/quicktime
- 4 string mdat video/quicktime
- # PNG [Portable Network Graphics, or "PNG's Not GIF"] images
- #
- # 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ...
- 0 string \211PNG\015 image/png
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement