Advertisement
Guest User

config

a guest
Mar 18th, 2018
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.76 KB | None | 0 0
  1. #</Directory>
  2.  
  3. #
  4. # DirectoryIndex: sets the file that Apache will serve if a directory
  5. # is requested.
  6. #
  7. # The index.html.var file (a type-map) is used to deliver content-
  8. # negotiated documents. The MultiViews Option can be used for the
  9. # same purpose, but it is much slower.
  10. #
  11. DirectoryIndex index.html index.html.var
  12.  
  13. #
  14. # AccessFileName: The name of the file to look for in each directory
  15. # for additional configuration directives. See also the AllowOverride
  16. # directive.
  17. #
  18. AccessFileName .htaccess
  19.  
  20. #
  21. # The following lines prevent .htaccess and .htpasswd files from being
  22. # viewed by Web clients.
  23. #
  24. <Files ~ "^\.ht">
  25. Order allow,deny
  26. Deny from all
  27. Satisfy All
  28. </Files>
  29.  
  30. #
  31. # TypesConfig describes where the mime.types file (or equivalent) is
  32. # to be found.
  33. #
  34. TypesConfig /etc/mime.types
  35.  
  36. #
  37. # DefaultType is the default MIME type the server will use for a document
  38. # if it cannot otherwise determine one, such as from filename extensions.
  39. # If your server contains mostly text or HTML documents, "text/plain" is
  40. # a good value. If most of your content is binary, such as applications
  41. # or images, you may want to use "application/octet-stream" instead to
  42. # keep browsers from trying to display binary files as though they are
  43. # text.
  44. #
  45. DefaultType text/plain
  46.  
  47. #
  48. # The mod_mime_magic module allows the server to use various hints from the
  49. # contents of the file itself to determine its type. The MIMEMagicFile
  50. # directive tells the module where the hint definitions are located.
  51. #
  52. <IfModule mod_mime_magic.c>
  53. # MIMEMagicFile /usr/share/magic.mime
  54. MIMEMagicFile conf/magic
  55. </IfModule>
  56.  
  57. #
  58. # HostnameLookups: Log the names of clients or just their IP addresses
  59. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  60. # The default is off because it'd be overall better for the net if people
  61. # had to knowingly turn this feature on, since enabling it means that
  62. # each client request will result in AT LEAST one lookup request to the
  63. # nameserver.
  64. #
  65. HostnameLookups Off
  66.  
  67. #
  68. # EnableMMAP: Control whether memory-mapping is used to deliver
  69. # files (assuming that the underlying OS supports it).
  70. # The default is on; turn this off if you serve from NFS-mounted
  71. # filesystems. On some systems, turning it off (regardless of
  72. # filesystem) can improve performance; for details, please see
  73. # http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap
  74. #
  75. #EnableMMAP off
  76.  
  77. #
  78. # EnableSendfile: Control whether the sendfile kernel support is
  79. # used to deliver files (assuming that the OS supports it).
  80. # The default is on; turn this off if you serve from NFS-mounted
  81. # filesystems. Please see
  82. # http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile
  83. #
  84. #EnableSendfile off
  85.  
  86. #
  87. # ErrorLog: The location of the error log file.
  88. # If you do not specify an ErrorLog directive within a <VirtualHost>
  89. # container, error messages relating to that virtual host will be
  90. # logged here. If you *do* define an error logfile for a <VirtualHost>
  91. # container, that host's errors will be logged there and not here.
  92. #
  93. ErrorLog logs/error_log
  94.  
  95. #
  96. # LogLevel: Control the number of messages logged to the error_log.
  97. # Possible values include: debug, info, notice, warn, error, crit,
  98. # alert, emerg.
  99. #
  100. LogLevel warn
  101.  
  102. #
  103. # The following directives define some format nicknames for use with
  104. # a CustomLog directive (see below).
  105. #
  106. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  107. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  108. LogFormat "%{Referer}i -> %U" referer
  109. LogFormat "%{User-agent}i" agent
  110.  
  111. # "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this
  112. # requires the mod_logio module to be loaded.
  113. #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  114.  
  115. #
  116. # The location and format of the access logfile (Common Logfile Format).
  117. # If you do not define any access logfiles within a <VirtualHost>
  118. # container, they will be logged here. Contrariwise, if you *do*
  119. # define per-<VirtualHost> access logfiles, transactions will be
  120. # logged therein and *not* in this file.
  121. #
  122. #CustomLog logs/access_log common
  123.  
  124. #
  125. # If you would like to have separate agent and referer logfiles, uncomment
  126. # the following directives.
  127. #
  128. #CustomLog logs/referer_log referer
  129. #CustomLog logs/agent_log agent
  130.  
  131. #
  132. # For a single logfile with access, agent, and referer information
  133. # (Combined Logfile Format), use the following directive:
  134. #
  135. CustomLog logs/access_log combined
  136.  
  137. #
  138. # Optionally add a line containing the server version and virtual host
  139. # name to server-generated pages (internal error documents, FTP directory
  140. # listings, mod_status and mod_info output etc., but not CGI generated
  141. # documents or custom error documents).
  142. # Set to "EMail" to also include a mailto: link to the ServerAdmin.
  143. # Set to one of: On | Off | EMail
  144. #
  145. ServerSignature On
  146.  
  147. #
  148. # Aliases: Add here as many aliases as you need (with no limit). The format is
  149. # Alias fakename realname
  150. #
  151. # Note that if you include a trailing / on fakename then the server will
  152. # require it to be present in the URL. So "/icons" isn't aliased in this
  153. # example, only "/icons/". If the fakename is slash-terminated, then the
  154. # realname must also be slash terminated, and if the fakename omits the
  155. # trailing slash, the realname must also omit it.
  156. #
  157. # We include the /icons/ alias for FancyIndexed directory listings. If you
  158. # do not use FancyIndexing, you may comment this out.
  159. #
  160. Alias /icons/ "/var/www/icons/"
  161.  
  162. <Directory "/var/www/icons">
  163. Options Indexes MultiViews FollowSymLinks
  164. AllowOverride None
  165. Order allow,deny
  166. Allow from all
  167. </Directory>
  168.  
  169. #
  170. # WebDAV module configuration section.
  171. #
  172. <IfModule mod_dav_fs.c>
  173. # Location of the WebDAV lock database.
  174. DAVLockDB /var/lib/dav/lockdb
  175. </IfModule>
  176.  
  177. #
  178. # ScriptAlias: This controls which directories contain server scripts.
  179. # ScriptAliases are essentially the same as Aliases, except that
  180. # documents in the realname directory are treated as applications and
  181. # run by the server when requested rather than as documents sent to the client.
  182. # The same rules about trailing "/" apply to ScriptAlias directives as to
  183. # Alias.
  184. #
  185. ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
  186.  
  187. #
  188. # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
  189. # CGI directory exists, if you have that configured.
  190. #
  191. <Directory "/var/www/cgi-bin">
  192. AllowOverride None
  193. Options None
  194. Order allow,deny
  195. Allow from all
  196. </Directory>
  197.  
  198. #
  199. # Redirect allows you to tell clients about documents which used to exist in
  200. # your server's namespace, but do not anymore. This allows you to tell the
  201. # clients where to look for the relocated document.
  202. # Example:
  203. # Redirect permanent /foo http://www.example.com/bar
  204.  
  205. #
  206. # Directives controlling the display of server-generated directory listings.
  207. #
  208.  
  209. #
  210. # IndexOptions: Controls the appearance of server-generated directory
  211. # listings.
  212. #
  213. IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8
  214.  
  215. #
  216. # AddIcon* directives tell the server which icon to show for different
  217. # files or filename extensions. These are only displayed for
  218. # FancyIndexed directories.
  219. #
  220. AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  221.  
  222. AddIconByType (TXT,/icons/text.gif) text/*
  223. AddIconByType (IMG,/icons/image2.gif) image/*
  224. AddIconByType (SND,/icons/sound2.gif) audio/*
  225. AddIconByType (VID,/icons/movie.gif) video/*
  226.  
  227. AddIcon /icons/binary.gif .bin .exe
  228. AddIcon /icons/binhex.gif .hqx
  229. AddIcon /icons/tar.gif .tar
  230. AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  231. AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  232. AddIcon /icons/a.gif .ps .ai .eps
  233. AddIcon /icons/layout.gif .html .shtml .htm .pdf
  234. AddIcon /icons/text.gif .txt
  235. AddIcon /icons/c.gif .c
  236. AddIcon /icons/p.gif .pl .py
  237. AddIcon /icons/f.gif .for
  238. AddIcon /icons/dvi.gif .dvi
  239. AddIcon /icons/uuencoded.gif .uu
  240. AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  241. AddIcon /icons/tex.gif .tex
  242. AddIcon /icons/bomb.gif /core
  243.  
  244. AddIcon /icons/back.gif ..
  245. AddIcon /icons/hand.right.gif README
  246. AddIcon /icons/folder.gif ^^DIRECTORY^^
  247. AddIcon /icons/blank.gif ^^BLANKICON^^
  248.  
  249. #
  250. # DefaultIcon is which icon to show for files which do not have an icon
  251. # explicitly set.
  252. #
  253. DefaultIcon /icons/unknown.gif
  254.  
  255. #
  256. # AddDescription allows you to place a short description after a file in
  257. # server-generated indexes. These are only displayed for FancyIndexed
  258. # directories.
  259. # Format: AddDescription "description" filename
  260. #
  261. #AddDescription "GZIP compressed document" .gz
  262. #AddDescription "tar archive" .tar
  263. #AddDescription "GZIP compressed tar archive" .tgz
  264.  
  265. #
  266. # ReadmeName is the name of the README file the server will look for by
  267. # default, and append to directory listings.
  268. #
  269. # HeaderName is the name of a file which should be prepended to
  270. # directory indexes.
  271. ReadmeName README.html
  272. HeaderName HEADER.html
  273.  
  274. #
  275. # IndexIgnore is a set of filenames which directory indexing should ignore
  276. # and not include in the listing. Shell-style wildcarding is permitted.
  277. #
  278. IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
  279.  
  280. #
  281. # DefaultLanguage and AddLanguage allows you to specify the language of
  282. # a document. You can then use content negotiation to give a browser a
  283. # file in a language the user can understand.
  284. #
  285. # Specify a default language. This means that all data
  286. # going out without a specific language tag (see below) will
  287. # be marked with this one. You probably do NOT want to set
  288. # this unless you are sure it is correct for all cases.
  289. #
  290. # * It is generally better to not mark a page as
  291. # * being a certain language than marking it with the wrong
  292. # * language!
  293. #
  294. # DefaultLanguage nl
  295. #
  296. # Note 1: The suffix does not have to be the same as the language
  297. # keyword --- those with documents in Polish (whose net-standard
  298. # language code is pl) may wish to use "AddLanguage pl .po" to
  299. # avoid the ambiguity with the common suffix for perl scripts.
  300. #
  301. # Note 2: The example entries below illustrate that in some cases
  302. # the two character 'Language' abbreviation is not identical to
  303. # the two character 'Country' code for its country,
  304. # E.g. 'Danmark/dk' versus 'Danish/da'.
  305. #
  306. # Note 3: In the case of 'ltz' we violate the RFC by using a three char
  307. # specifier. There is 'work in progress' to fix this and get
  308. # the reference data for rfc1766 cleaned up.
  309. #
  310. # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
  311. # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
  312. # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
  313. # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
  314. # Norwegian (no) - Polish (pl) - Portugese (pt)
  315. # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
  316. # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
  317. #
  318. AddLanguage ca .ca
  319. AddLanguage cs .cz .cs
  320. AddLanguage da .dk
  321. AddLanguage de .de
  322. AddLanguage el .el
  323. AddLanguage en .en
  324. AddLanguage eo .eo
  325. AddLanguage es .es
  326. AddLanguage et .et
  327. AddLanguage fr .fr
  328. AddLanguage he .he
  329. AddLanguage hr .hr
  330. AddLanguage it .it
  331. AddLanguage ja .ja
  332. AddLanguage ko .ko
  333. AddLanguage ltz .ltz
  334. AddLanguage nl .nl
  335. AddLanguage nn .nn
  336. AddLanguage no .no
  337. AddLanguage pl .po
  338. AddLanguage pt .pt
  339. AddLanguage pt-BR .pt-br
  340. AddLanguage ru .ru
  341. AddLanguage sv .sv
  342. AddLanguage zh-CN .zh-cn
  343. AddLanguage zh-TW .zh-tw
  344.  
  345. #
  346. # LanguagePriority allows you to give precedence to some languages
  347. # in case of a tie during content negotiation.
  348. #
  349. # Just list the languages in decreasing order of preference. We have
  350. # more or less alphabetized them here. You probably want to change this.
  351. #
  352. 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
  353.  
  354. #
  355. # ForceLanguagePriority allows you to serve a result page rather than
  356. # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
  357. # [in case no accepted languages matched the available variants]
  358. #
  359. ForceLanguagePriority Prefer Fallback
  360.  
  361. #
  362. # Specify a default charset for all content served; this enables
  363. # interpretation of all content as UTF-8 by default. To use the
  364. # default browser choice (ISO-8859-1), or to allow the META tags
  365. # in HTML content to override this choice, comment out this
  366. # directive:
  367. #
  368. AddDefaultCharset UTF-8
  369.  
  370. #
  371. # AddType allows you to add to or override the MIME configuration
  372. # file mime.types for specific file types.
  373. #
  374. #AddType application/x-tar .tgz
  375.  
  376. #
  377. # AddEncoding allows you to have certain browsers uncompress
  378. # information on the fly. Note: Not all browsers support this.
  379. # Despite the name similarity, the following Add* directives have nothing
  380. # to do with the FancyIndexing customization directives above.
  381. #
  382. #AddEncoding x-compress .Z
  383. #AddEncoding x-gzip .gz .tgz
  384.  
  385. # If the AddEncoding directives above are commented-out, then you
  386. # probably should define those extensions to indicate media types:
  387. #
  388. AddType application/x-compress .Z
  389. AddType application/x-gzip .gz .tgz
  390.  
  391. #
  392. # MIME-types for downloading Certificates and CRLs
  393. #
  394. AddType application/x-x509-ca-cert .crt
  395. AddType application/x-pkcs7-crl .crl
  396.  
  397. #
  398. # AddHandler allows you to map certain file extensions to "handlers":
  399. # actions unrelated to filetype. These can be either built into the server
  400. # or added with the Action directive (see below)
  401. #
  402. # To use CGI scripts outside of ScriptAliased directories:
  403. # (You will also need to add "ExecCGI" to the "Options" directive.)
  404. #
  405. #AddHandler cgi-script .cgi
  406.  
  407. #
  408. # For files that include their own HTTP headers:
  409. #
  410. #AddHandler send-as-is asis
  411.  
  412. #
  413. # For type maps (negotiated resources):
  414. # (This is enabled by default to allow the Apache "It Worked" page
  415. # to be distributed in multiple languages.)
  416. #
  417. AddHandler type-map var
  418.  
  419. #
  420. # Filters allow you to process content before it is sent to the client.
  421. #
  422. # To parse .shtml files for server-side includes (SSI):
  423. # (You will also need to add "Includes" to the "Options" directive.)
  424. #
  425. AddType text/html .shtml
  426. AddOutputFilter INCLUDES .shtml
  427.  
  428. #
  429. # Action lets you define media types that will execute a script whenever
  430. # a matching file is called. This eliminates the need for repeated URL
  431. # pathnames for oft-used CGI file processors.
  432. # Format: Action media/type /cgi-script/location
  433. # Format: Action handler-name /cgi-script/location
  434. #
  435.  
  436. #
  437. # Customizable error responses come in three flavors:
  438. # 1) plain text 2) local redirects 3) external redirects
  439. #
  440. # Some examples:
  441. #ErrorDocument 500 "The server made a boo boo."
  442. #ErrorDocument 404 /missing.html
  443. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  444. #ErrorDocument 402 http://www.example.com/subscription_info.html
  445. #
  446.  
  447. #
  448. # Putting this all together, we can internationalize error responses.
  449. #
  450. # We use Alias to redirect any /error/HTTP_<error>.html.var response to
  451. # our collection of by-error message multi-language collections. We use
  452. # includes to substitute the appropriate text.
  453. #
  454. # You can modify the messages' appearance without changing any of the
  455. # default HTTP_<error>.html.var files by adding the line:
  456. #
  457. # Alias /error/include/ "/your/include/path/"
  458. #
  459. # which allows you to create your own set of files by starting with the
  460. # /var/www/error/include/ files and
  461. # copying them to /your/include/path/, even on a per-VirtualHost basis.
  462. #
  463.  
  464. Alias /error/ "/var/www/error/"
  465.  
  466. <IfModule mod_negotiation.c>
  467. <IfModule mod_include.c>
  468. <Directory "/var/www/error">
  469. AllowOverride All
  470. Options IncludesNoExec
  471. AddOutputFilter Includes html
  472. AddHandler type-map var
  473. Order allow,deny
  474. Allow from all
  475. LanguagePriority en es de fr
  476. ForceLanguagePriority Prefer Fallback
  477. </Directory>
  478.  
  479. # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
  480. # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
  481. # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
  482. # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
  483. # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
  484. # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
  485. # ErrorDocument 410 /error/HTTP_GONE.html.var
  486. # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
  487. # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
  488. # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
  489. # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
  490. # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
  491. # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
  492. # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
  493. # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
  494. # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
  495. # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
  496.  
  497. </IfModule>
  498. </IfModule>
  499.  
  500. #
  501. # The following directives modify normal HTTP response behavior to
  502. # handle known problems with browser implementations.
  503. #
  504. BrowserMatch "Mozilla/2" nokeepalive
  505. BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  506. BrowserMatch "RealPlayer 4\.0" force-response-1.0
  507. BrowserMatch "Java/1\.0" force-response-1.0
  508. BrowserMatch "JDK/1\.0" force-response-1.0
  509.  
  510. #
  511. # The following directive disables redirects on non-GET requests for
  512. # a directory that does not include the trailing slash. This fixes a
  513. # problem with Microsoft WebFolders which does not appropriately handle
  514. # redirects for folders with DAV methods.
  515. # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
  516. #
  517. BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
  518. BrowserMatch "MS FrontPage" redirect-carefully
  519. BrowserMatch "^WebDrive" redirect-carefully
  520. BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
  521. BrowserMatch "^gnome-vfs/1.0" redirect-carefully
  522. BrowserMatch "^XML Spy" redirect-carefully
  523. BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
  524.  
  525. #
  526. # Allow server status reports generated by mod_status,
  527. # with the URL of http://servername/server-status
  528. # Change the ".example.com" to match your domain to enable.
  529. #
  530. #<Location /server-status>
  531. # SetHandler server-status
  532. # Order deny,allow
  533. # Deny from all
  534. # Allow from .example.com
  535. #</Location>
  536.  
  537. #
  538. # Allow remote server configuration reports, with the URL of
  539. # http://servername/server-info (requires that mod_info.c be loaded).
  540. # Change the ".example.com" to match your domain to enable.
  541. #
  542. #<Location /server-info>
  543. # SetHandler server-info
  544. # Order deny,allow
  545. # Deny from all
  546. # Allow from .example.com
  547. #</Location>
  548.  
  549. #
  550. # Proxy Server directives. Uncomment the following lines to
  551. # enable the proxy server:
  552. #
  553. #<IfModule mod_proxy.c>
  554. #ProxyRequests On
  555. #
  556. #<Proxy *>
  557. # Order deny,allow
  558. # Deny from all
  559. # Allow from .example.com
  560. #</Proxy>
  561.  
  562. #
  563. # Enable/disable the handling of HTTP/1.1 "Via:" headers.
  564. # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
  565. # Set to one of: Off | On | Full | Block
  566. #
  567. #ProxyVia On
  568.  
  569. #
  570. # To enable a cache of proxied content, uncomment the following lines.
  571. # See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
  572. #
  573. #<IfModule mod_disk_cache.c>
  574. # CacheEnable disk /
  575. # CacheRoot "/var/cache/mod_proxy"
  576. #</IfModule>
  577. #
  578.  
  579. #</IfModule>
  580. # End of proxy directives.
  581.  
  582. ### Section 3: Virtual Hosts
  583. #
  584. # VirtualHost: If you want to maintain multiple domains/hostnames on your
  585. # machine you can setup VirtualHost containers for them. Most configurations
  586. # use only name-based virtual hosts so the server doesn't need to worry about
  587. # IP addresses. This is indicated by the asterisks in the directives below.
  588. #
  589. # Please see the documentation at
  590. # <URL:http://httpd.apache.org/docs/2.2/vhosts/>
  591. # for further details before you try to setup virtual hosts.
  592. #
  593. # You may use the command line option '-S' to verify your virtual host
  594. # configuration.
  595.  
  596. #
  597. # Use name-based virtual hosting.
  598. #
  599. #NameVirtualHost *:80
  600. #
  601. # NOTE: NameVirtualHost cannot be used without a port specifier
  602. # (e.g. :80) if mod_ssl is being used, due to the nature of the
  603. # SSL protocol.
  604. #
  605.  
  606. #
  607. # VirtualHost example:
  608. # Almost any Apache directive may go into a VirtualHost container.
  609. # The first VirtualHost section is used for requests without a known
  610. # server name.
  611. #
  612. #<VirtualHost *:80>
  613. # ServerAdmin webmaster@dummy-host.example.com
  614. # DocumentRoot /www/docs/dummy-host.example.com
  615. # ServerName dummy-host.example.com
  616. # ErrorLog logs/dummy-host.example.com-error_log
  617. # CustomLog logs/dummy-host.example.com-access_log common
  618. #</VirtualHost>
  619. <IfModule mpm_prefork_module>
  620. StartServers 12
  621. MinSpareServers 60
  622. MaxSpareServers 120
  623. MaxClients 256
  624. MaxRequestsPerChild 4500
  625. </IfModule>
  626. <IfModule mod_ssl.c>
  627. Listen 443
  628. NameVirtualHost *:443
  629. </IfModule>
  630. Include /etc/httpd/conf/httpd-le-ssl.conf
  631.  
  632. ==> /etc/httpd/conf/httpd-le-ssl.conf <==
  633. <IfModule mod_ssl.c>
  634. <VirtualHost *:443>
  635. DocumentRoot "/var/www/html"
  636. ServerName www.eu-r.com
  637.  
  638. # Other directives here
  639. SSLCertificateFile /etc/letsencrypt/live/www.eu-r.com/cert.pem
  640. SSLCertificateKeyFile /etc/letsencrypt/live/www.eu-r.com/privkey.pem
  641. Include /etc/letsencrypt/options-ssl-apache.conf
  642. SSLCertificateChainFile /etc/letsencrypt/live/www.eu-r.com/chain.pem
  643. </VirtualHost>
  644. </IfModule>
  645.  
  646. ==> /etc/httpd/conf/magic <==
  647. # Magic data for mod_mime_magic Apache module (originally for file(1) command)
  648. # The module is described in /manual/mod/mod_mime_magic.html
  649. #
  650. # The format is 4-5 columns:
  651. # Column #1: byte number to begin checking from, ">" indicates continuation
  652. # Column #2: type of data to match
  653. # Column #3: contents of data to match
  654. # Column #4: MIME type of result
  655. # Column #5: MIME encoding of result (optional)
  656.  
  657. #------------------------------------------------------------------------------
  658. # Localstuff: file(1) magic for locally observed files
  659. # Add any locally observed files here.
  660.  
  661. #------------------------------------------------------------------------------
  662. # end local stuff
  663. #------------------------------------------------------------------------------
  664.  
  665. #------------------------------------------------------------------------------
  666. # Java
  667.  
  668. 0 short 0xcafe
  669. >2 short 0xbabe application/java
  670.  
  671. #------------------------------------------------------------------------------
  672. # audio: file(1) magic for sound formats
  673. #
  674. # from Jan Nicolai Langfeldt <janl@ifi.uio.no>,
  675. #
  676.  
  677. # Sun/NeXT audio data
  678. 0 string .snd
  679. >12 belong 1 audio/basic
  680. >12 belong 2 audio/basic
  681. >12 belong 3 audio/basic
  682. >12 belong 4 audio/basic
  683. >12 belong 5 audio/basic
  684. >12 belong 6 audio/basic
  685. >12 belong 7 audio/basic
  686.  
  687. >12 belong 23 audio/x-adpcm
  688.  
  689. # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
  690. # that uses little-endian encoding and has a different magic number
  691. # (0x0064732E in little-endian encoding).
  692. 0 lelong 0x0064732E
  693. >12 lelong 1 audio/x-dec-basic
  694. >12 lelong 2 audio/x-dec-basic
  695. >12 lelong 3 audio/x-dec-basic
  696. >12 lelong 4 audio/x-dec-basic
  697. >12 lelong 5 audio/x-dec-basic
  698. >12 lelong 6 audio/x-dec-basic
  699. >12 lelong 7 audio/x-dec-basic
  700. # compressed (G.721 ADPCM)
  701. >12 lelong 23 audio/x-dec-adpcm
  702.  
  703. # Bytes 0-3 of AIFF, AIFF-C, & 8SVX audio files are "FORM"
  704. # AIFF audio data
  705. 8 string AIFF audio/x-aiff
  706. # AIFF-C audio data
  707. 8 string AIFC audio/x-aiff
  708. # IFF/8SVX audio data
  709. 8 string 8SVX audio/x-aiff
  710.  
  711. # Creative Labs AUDIO stuff
  712. # Standard MIDI data
  713. 0 string MThd audio/unknown
  714. #>9 byte >0 (format %d)
  715. #>11 byte >1 using %d channels
  716. # Creative Music (CMF) data
  717. 0 string CTMF audio/unknown
  718. # SoundBlaster instrument data
  719. 0 string SBI audio/unknown
  720. # Creative Labs voice data
  721. 0 string Creative\ Voice\ File audio/unknown
  722. ## is this next line right? it came this way...
  723. #>19 byte 0x1A
  724. #>23 byte >0 - version %d
  725. #>22 byte >0 \b.%d
  726.  
  727. # [GRR 950115: is this also Creative Labs? Guessing that first line
  728. # should be string instead of unknown-endian long...]
  729. #0 long 0x4e54524b MultiTrack sound data
  730. #0 string NTRK MultiTrack sound data
  731. #>4 long x - version %ld
  732.  
  733. # Microsoft WAVE format (*.wav)
  734. # [GRR 950115: probably all of the shorts and longs should be leshort/lelong]
  735. # Microsoft RIFF
  736. 0 string RIFF audio/unknown
  737. # - WAVE format
  738. >8 string WAVE audio/x-wav
  739. # MPEG audio.
  740. 0 beshort&0xfff0 0xfff0 audio/mpeg
  741. # C64 SID Music files, from Linus Walleij <triad@df.lth.se>
  742. 0 string PSID audio/prs.sid
  743.  
  744. #------------------------------------------------------------------------------
  745. # c-lang: file(1) magic for C programs or various scripts
  746. #
  747.  
  748. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  749. # ideally should go into "images", but entries below would tag XPM as C source
  750. 0 string /*\ XPM image/x-xbm 7bit
  751.  
  752. # this first will upset you if you're a PL/1 shop... (are there any left?)
  753. # in which case rm it; ascmagic will catch real C programs
  754. # C or REXX program text
  755. 0 string /* text/plain
  756. # C++ program text
  757. 0 string // text/plain
  758.  
  759. #------------------------------------------------------------------------------
  760. # compress: file(1) magic for pure-compression formats (no archives)
  761. #
  762. # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, whap, etc.
  763. #
  764. # Formats for various forms of compressed data
  765. # Formats for "compress" proper have been moved into "compress.c",
  766. # because it tries to uncompress it to figure out what's inside.
  767.  
  768. # standard unix compress
  769. 0 string \037\235 application/octet-stream x-compress
  770.  
  771. # gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver)
  772. 0 string \037\213 application/octet-stream x-gzip
  773.  
  774. # According to gzip.h, this is the correct byte order for packed data.
  775. 0 string \037\036 application/octet-stream
  776. #
  777. # This magic number is byte-order-independent.
  778. #
  779. 0 short 017437 application/octet-stream
  780.  
  781. # XXX - why *two* entries for "compacted data", one of which is
  782. # byte-order independent, and one of which is byte-order dependent?
  783. #
  784. # compacted data
  785. 0 short 0x1fff application/octet-stream
  786. 0 string \377\037 application/octet-stream
  787. # huf output
  788. 0 short 0145405 application/octet-stream
  789.  
  790. # Squeeze and Crunch...
  791. # These numbers were gleaned from the Unix versions of the programs to
  792. # handle these formats. Note that I can only uncrunch, not crunch, and
  793. # I didn't have a crunched file handy, so the crunch number is untested.
  794. # Keith Waclena <keith@cerberus.uchicago.edu>
  795. #0 leshort 0x76FF squeezed data (CP/M, DOS)
  796. #0 leshort 0x76FE crunched data (CP/M, DOS)
  797.  
  798. # Freeze
  799. #0 string \037\237 Frozen file 2.1
  800. #0 string \037\236 Frozen file 1.0 (or gzip 0.5)
  801.  
  802. # lzh?
  803. #0 string \037\240 LZH compressed data
  804.  
  805. #------------------------------------------------------------------------------
  806. # frame: file(1) magic for FrameMaker files
  807. #
  808. # This stuff came on a FrameMaker demo tape, most of which is
  809. # copyright, but this file is "published" as witness the following:
  810. #
  811. 0 string \<MakerFile application/x-frame
  812. 0 string \<MIFFile application/x-frame
  813. 0 string \<MakerDictionary application/x-frame
  814. 0 string \<MakerScreenFon application/x-frame
  815. 0 string \<MML application/x-frame
  816. 0 string \<Book application/x-frame
  817. 0 string \<Maker application/x-frame
  818.  
  819. #------------------------------------------------------------------------------
  820. # html: file(1) magic for HTML (HyperText Markup Language) docs
  821. #
  822. # from Daniel Quinlan <quinlan@yggdrasil.com>
  823. # and Anna Shergold <anna@inext.co.uk>
  824. #
  825. 0 string \<!DOCTYPE\ HTML text/html
  826. 0 string \<!doctype\ html text/html
  827. 0 string \<HEAD text/html
  828. 0 string \<head text/html
  829. 0 string \<TITLE text/html
  830. 0 string \<title text/html
  831. 0 string \<html text/html
  832. 0 string \<HTML text/html
  833. 0 string \<!-- text/html
  834. 0 string \<h1 text/html
  835. 0 string \<H1 text/html
  836.  
  837. # XML eXtensible Markup Language, from Linus Walleij <triad@df.lth.se>
  838. 0 string \<?xml text/xml
  839.  
  840. #------------------------------------------------------------------------------
  841. # images: file(1) magic for image formats (see also "c-lang" for XPM bitmaps)
  842. #
  843. # originally from jef@helios.ee.lbl.gov (Jef Poskanzer),
  844. # additions by janl@ifi.uio.no as well as others. Jan also suggested
  845. # merging several one- and two-line files into here.
  846. #
  847. # XXX - byte order for GIF and TIFF fields?
  848. # [GRR: TIFF allows both byte orders; GIF is probably little-endian]
  849. #
  850.  
  851. # [GRR: what the hell is this doing in here?]
  852. #0 string xbtoa btoa'd file
  853.  
  854. # PBMPLUS
  855. # PBM file
  856. 0 string P1 image/x-portable-bitmap 7bit
  857. # PGM file
  858. 0 string P2 image/x-portable-greymap 7bit
  859. # PPM file
  860. 0 string P3 image/x-portable-pixmap 7bit
  861. # PBM "rawbits" file
  862. 0 string P4 image/x-portable-bitmap
  863. # PGM "rawbits" file
  864. 0 string P5 image/x-portable-greymap
  865. # PPM "rawbits" file
  866. 0 string P6 image/x-portable-pixmap
  867.  
  868. # NIFF (Navy Interchange File Format, a modification of TIFF)
  869. # [GRR: this *must* go before TIFF]
  870. 0 string IIN1 image/x-niff
  871.  
  872. # TIFF and friends
  873. # TIFF file, big-endian
  874. 0 string MM image/tiff
  875. # TIFF file, little-endian
  876. 0 string II image/tiff
  877.  
  878. # possible GIF replacements; none yet released!
  879. # (Greg Roelofs, newt@uchicago.edu)
  880. #
  881. # GRR 950115: this was mine ("Zip GIF"):
  882. # ZIF image (GIF+deflate alpha)
  883. 0 string GIF94z image/unknown
  884. #
  885. # GRR 950115: this is Jeremy Wohl's Free Graphics Format (better):
  886. # FGF image (GIF+deflate beta)
  887. 0 string FGF95a image/unknown
  888. #
  889. # GRR 950115: this is Thomas Boutell's Portable Bitmap Format proposal
  890. # (best; not yet implemented):
  891. # PBF image (deflate compression)
  892. 0 string PBF image/unknown
  893.  
  894. # GIF
  895. 0 string GIF image/gif
  896.  
  897. # JPEG images
  898. 0 beshort 0xffd8 image/jpeg
  899.  
  900. # PC bitmaps (OS/2, Windoze BMP files) (Greg Roelofs, newt@uchicago.edu)
  901. 0 string BM image/bmp
  902. #>14 byte 12 (OS/2 1.x format)
  903. #>14 byte 64 (OS/2 2.x format)
  904. #>14 byte 40 (Windows 3.x format)
  905. #0 string IC icon
  906. #0 string PI pointer
  907. #0 string CI color icon
  908. #0 string CP color pointer
  909. #0 string BA bitmap array
  910.  
  911.  
  912. #------------------------------------------------------------------------------
  913. # lisp: file(1) magic for lisp programs
  914. #
  915. # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com)
  916. 0 string ;; text/plain 8bit
  917. # Emacs 18 - this is always correct, but not very magical.
  918. 0 string \012( application/x-elc
  919. # Emacs 19
  920. 0 string ;ELC\023\000\000\000 application/x-elc
  921.  
  922. #------------------------------------------------------------------------------
  923. # mail.news: file(1) magic for mail and news
  924. #
  925. # There are tests to ascmagic.c to cope with mail and news.
  926. 0 string Relay-Version: message/rfc822 7bit
  927. 0 string #!\ rnews message/rfc822 7bit
  928. 0 string N#!\ rnews message/rfc822 7bit
  929. 0 string Forward\ to message/rfc822 7bit
  930. 0 string Pipe\ to message/rfc822 7bit
  931. 0 string Return-Path: message/rfc822 7bit
  932. 0 string Path: message/news 8bit
  933. 0 string Xref: message/news 8bit
  934. 0 string From: message/rfc822 7bit
  935. 0 string Article message/news 8bit
  936. #------------------------------------------------------------------------------
  937. # msword: file(1) magic for MS Word files
  938. #
  939. # Contributor claims:
  940. # Reversed-engineered MS Word magic numbers
  941. #
  942.  
  943. 0 string \376\067\0\043 application/msword
  944. 0 string \333\245-\0\0\0 application/msword
  945.  
  946. # disable this one because it applies also to other
  947. # Office/OLE documents for which msword is not correct. See PR#2608.
  948. #0 string \320\317\021\340\241\261 application/msword
  949.  
  950.  
  951.  
  952. #------------------------------------------------------------------------------
  953. # printer: file(1) magic for printer-formatted files
  954. #
  955.  
  956. # PostScript
  957. 0 string %! application/postscript
  958. 0 string \004%! application/postscript
  959.  
  960. # Acrobat
  961. # (due to clamen@cs.cmu.edu)
  962. 0 string %PDF- application/pdf
  963.  
  964. #------------------------------------------------------------------------------
  965. # sc: file(1) magic for "sc" spreadsheet
  966. #
  967. 38 string Spreadsheet application/x-sc
  968.  
  969. #------------------------------------------------------------------------------
  970. # tex: file(1) magic for TeX files
  971. #
  972. # XXX - needs byte-endian stuff (big-endian and little-endian DVI?)
  973. #
  974. # From <conklin@talisman.kaleida.com>
  975.  
  976. # Although we may know the offset of certain text fields in TeX DVI
  977. # and font files, we can't use them reliably because they are not
  978. # zero terminated. [but we do anyway, christos]
  979. 0 string \367\002 application/x-dvi
  980. #0 string \367\203 TeX generic font data
  981. #0 string \367\131 TeX packed font data
  982. #0 string \367\312 TeX virtual font data
  983. #0 string This\ is\ TeX, TeX transcript text
  984. #0 string This\ is\ METAFONT, METAFONT transcript text
  985.  
  986. # There is no way to detect TeX Font Metric (*.tfm) files without
  987. # breaking them apart and reading the data. The following patterns
  988. # match most *.tfm files generated by METAFONT or afm2tfm.
  989. #2 string \000\021 TeX font metric data
  990. #2 string \000\022 TeX font metric data
  991. #>34 string >\0 (%s)
  992.  
  993. # Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
  994. #0 string \\input\ texinfo Texinfo source text
  995. #0 string This\ is\ Info\ file GNU Info text
  996.  
  997. # correct TeX magic for Linux (and maybe more)
  998. # from Peter Tobias (tobias@server.et-inf.fho-emden.de)
  999. #
  1000. 0 leshort 0x02f7 application/x-dvi
  1001.  
  1002. # RTF - Rich Text Format
  1003. 0 string {\\rtf application/rtf
  1004.  
  1005. #------------------------------------------------------------------------------
  1006. # animation: file(1) magic for animation/movie formats
  1007. #
  1008. # animation formats, originally from vax@ccwf.cc.utexas.edu (VaX#n8)
  1009. # MPEG file
  1010. 0 string \000\000\001\263 video/mpeg
  1011. #
  1012. # The contributor claims:
  1013. # I couldn't find a real magic number for these, however, this
  1014. # -appears- to work. Note that it might catch other files, too,
  1015. # so BE CAREFUL!
  1016. #
  1017. # Note that title and author appear in the two 20-byte chunks
  1018. # at decimal offsets 2 and 22, respectively, but they are XOR'ed with
  1019. # 255 (hex FF)! DL format SUCKS BIG ROCKS.
  1020. #
  1021. # DL file version 1 , medium format (160x100, 4 images/screen)
  1022. 0 byte 1 video/unknown
  1023. 0 byte 2 video/unknown
  1024. # Quicktime video, from Linus Walleij <triad@df.lth.se>
  1025. # from Apple quicktime file format documentation.
  1026. 4 string moov video/quicktime
  1027. 4 string mdat video/quicktime
  1028.  
  1029. # PNG [Portable Network Graphics, or "PNG's Not GIF"] images
  1030. #
  1031. # 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ...
  1032. 0 string \211PNG\015 image/png
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement