Advertisement
Guest User

Untitled

a guest
Nov 4th, 2015
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.40 KB | None | 0 0
  1. LoadModule php5_module "D:/Server/php/php5apache2_4.dll"
  2. AddHandler application/x-httpd-php .php
  3.  
  4. PHPIniDir "D:/Server/php/"
  5.  
  6. ServerSignature Off
  7. ServerTokens Prod
  8.  
  9.  
  10. ListenBacklog 500
  11.  
  12. AcceptFilter http none
  13. AcceptFilter https none
  14.  
  15. EnableSendfile off
  16. EnableMMAP off
  17.  
  18.  
  19.  
  20.  
  21. ThreadLimit 300
  22. ThreadsPerChild 300
  23. MaxRequestsPerChild 0
  24.  
  25.  
  26.  
  27. HostnameLookups off
  28.  
  29. Options -Indexes
  30. ####Options -Includes
  31. Options -ExecCGI
  32. #Options -FollowSymLinks
  33. Options +FollowSymLinks -SymLinksIfOwnerMatch
  34.  
  35. Timeout 30
  36.  
  37. KeepAlive On
  38. KeepAliveTimeout 60
  39.  
  40.  
  41. SetOutputFilter DEFLATE
  42.  
  43. <Directory />
  44.  
  45. Order Deny,Allow
  46. Deny from all
  47. Options None
  48. AllowOverride None
  49.  
  50. </Directory>
  51.  
  52. <Directory D:/Server/apache/htdocs>
  53.  
  54. Order Allow,Deny
  55. Allow from all
  56. AllowOverride all
  57. </Directory>
  58.  
  59.  
  60.  
  61.  
  62. <IfModule mod_deflate.c>
  63. # Force deflate for mangled headers:
  64. # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
  65. <IfModule mod_setenvif.c>
  66. <IfModule mod_headers.c>
  67. SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
  68. RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
  69. </IfModule>
  70. </IfModule>
  71.  
  72.  
  73. <IfModule mod_filter.c>
  74. AddOutputFilterByType DEFLATE text/html text/plain text/css \
  75. application/json text/javascript application/javascript application/x-javascript text/x-js text/ecmascript application/ecmascript text/vbscript text/fluffscript \
  76. text/xml application/xml text/x-component \
  77. application/xhtml+xml application/rss+xml application/atom+xml \
  78. image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
  79. </IfModule>
  80. </IfModule>
  81.  
  82.  
  83.  
  84. <IfModule mod_headers.c>
  85. <FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
  86. Header set Access-Control-Allow-Origin "*"
  87. </FilesMatch>
  88. </IfModule>
  89.  
  90.  
  91.  
  92. # No caching for dynamic files
  93. <filesMatch "\.(php|cgi|pl|htm|html)$">
  94. ExpiresDefault A0
  95. Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
  96. Header set Pragma "no-cache"
  97. </filesMatch>
  98.  
  99. # 2 DAYS
  100. <filesMatch "\.(xml|txt)$">
  101. ExpiresDefault A172800
  102. Header set Cache-Control "max-age=172800, must-revalidate"
  103. </filesMatch>
  104.  
  105. # 1 WEEK
  106. <filesMatch "\.(jpg|jpeg|png|gif|swf|js|css)$">
  107. ExpiresDefault A604800
  108. Header set Cache-Control "max-age=604800, must-revalidate"
  109. </filesMatch>
  110.  
  111. # 1 MONTH
  112. <filesMatch "\.(ico|pdf|flv|woff)$">
  113. ExpiresDefault A2419200
  114. Header set Cache-Control "max-age=2419200, must-revalidate"
  115. </filesMatch>
  116.  
  117.  
  118.  
  119. <IfModule mod_mime.c>
  120. AddType application/x-compress .Z
  121. AddType application/x-gzip .gz .tgz
  122.  
  123. AddType text/css .css
  124. AddType application/x-javascript .js
  125. AddType text/x-component .htc
  126. AddType text/html .html .htm
  127. AddType text/richtext .rtf .rtx
  128. AddType image/svg+xml .svg .svgz
  129. AddType text/plain .txt
  130. AddType text/xsd .xsd
  131. AddType text/xsl .xsl
  132. AddType text/xml .xml
  133. AddType video/asf .asf .asx .wax .wmv .wmx
  134. AddType video/avi .avi
  135. AddType image/bmp .bmp
  136. AddType application/java .class
  137. AddType video/divx .divx
  138. AddType application/msword .doc .docx
  139. AddType application/vnd.ms-fontobject .eot
  140. AddType application/x-msdownload .exe
  141. AddType image/gif .gif
  142. AddType application/x-gzip .gz .gzip
  143. AddType image/x-icon .ico
  144. AddType image/jpeg .jpg .jpeg .jpe
  145. AddType application/vnd.ms-access .mdb
  146. AddType audio/midi .mid .midi
  147. AddType video/quicktime .mov .qt
  148. AddType audio/mpeg .mp3 .m4a
  149. AddType video/mp4 .mp4 .m4v
  150. AddType video/mpeg .mpeg .mpg .mpe
  151. AddType application/vnd.ms-project .mpp
  152. AddType application/x-font-otf .otf
  153. AddType application/vnd.oasis.opendocument.database .odb
  154. AddType application/vnd.oasis.opendocument.chart .odc
  155. AddType application/vnd.oasis.opendocument.formula .odf
  156. AddType application/vnd.oasis.opendocument.graphics .odg
  157. AddType application/vnd.oasis.opendocument.presentation .odp
  158. AddType application/vnd.oasis.opendocument.spreadsheet .ods
  159. AddType application/vnd.oasis.opendocument.text .odt
  160. AddType audio/ogg .ogg
  161. AddType application/pdf .pdf
  162. AddType image/png .png
  163. AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
  164. AddType audio/x-realaudio .ra .ram
  165. AddType application/x-shockwave-flash .swf
  166. AddType application/x-tar .tar
  167. AddType image/tiff .tif .tiff
  168. AddType application/x-font-ttf .ttf .ttc
  169. AddType audio/wav .wav
  170. AddType audio/wma .wma
  171. AddType application/vnd.ms-write .wri
  172. AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
  173. AddType application/zip .zip
  174. </IfModule>
  175.  
  176. # ----------------------------------------------------------------------
  177. # Block access to backup and source files (Security)
  178. # This files may be left by some text/html editors and pose a great security danger
  179. #
  180.  
  181. <FilesMatch "(\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$">
  182. Order allow,deny
  183. Deny from all
  184. Satisfy All
  185. </FilesMatch>
  186.  
  187.  
  188. # ----------------------------------------------------------------------
  189. # Increase cookie security (Security)
  190. # This files may be left by some text/html editors and pose a great security danger
  191. # ----------------------------------------------------------------------
  192. <IfModule php5_module>
  193. php_value session.cookie_httponly true
  194. </IfModule>
  195.  
  196.  
  197. # ----------------------------------------------------------------------
  198. # Force latest IE rendering engine
  199. # ----------------------------------------------------------------------
  200.  
  201.  
  202.  
  203. <IfModule mod_headers.c>
  204. Header set X-UA-Compatible "IE=Edge,chrome=1"
  205. # mod_headers can't match by content-type, but we don't want to this header on everything
  206. <FilesMatch "\.(js|css|gif|png|jpe?g|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|oex|xpi|safariextz|vcf)$" >
  207. Header unset X-UA-Compatible
  208. </FilesMatch>
  209. </IfModule>
  210.  
  211.  
  212.  
  213. # ----------------------------------------------------------------------
  214. # Instructs the proxies to cache two versions of the resource: one compressed, and one uncompressed.
  215. # https://developers.google.com/speed/docs/best-practices/caching#LeverageProxyCaching
  216. # ----------------------------------------------------------------------
  217. <IfModule mod_headers.c>
  218. <FilesMatch "\.(js|css|xml|gz)$">
  219. Header append Vary: Accept-Encoding
  220. </FilesMatch>
  221. </IfModule>
  222.  
  223. # ----------------------------------------------------------------------
  224. # CORS-enabled images (@crossorigin)
  225. # Send CORS headers if browsers request them; enabled by default for images.
  226. # http://developer.mozilla.org/en/CORS_Enabled_Image
  227. # http://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
  228. # http://hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
  229. # http://wiki.mozilla.org/Security/Reviews/crossoriginAttribute
  230. # ----------------------------------------------------------------------
  231.  
  232. <IfModule mod_setenvif.c>
  233. <IfModule mod_headers.c>
  234. <FilesMatch "\.(gif|png|jpeg|svg|svgz|ico|webp)$">
  235. SetEnvIf Origin ":" IS_CORS
  236. Header set Access-Control-Allow-Origin "*" env=IS_CORS
  237. </FilesMatch>
  238. </IfModule>
  239. </IfModule>
  240.  
  241. # This is the main Apache HTTP server configuration file. It contains the
  242. # configuration directives that give the server its instructions.
  243. # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
  244. # In particular, see
  245. # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
  246. # for a discussion of each configuration directive.
  247. #
  248. # Do NOT simply read the instructions in here without understanding
  249. # what they do. They're here only as hints or reminders. If you are unsure
  250. # consult the online docs. You have been warned.
  251. #
  252. # Configuration and logfile names: If the filenames you specify for many
  253. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  254. # server will use that explicit path. If the filenames do *not* begin
  255. # with "/", the value of ServerRoot is prepended -- so "logs/access_log"
  256. # with ServerRoot set to "/usr/local/apache2" will be interpreted by the
  257. # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
  258. # will be interpreted as '/logs/access_log'.
  259. #
  260. # NOTE: Where filenames are specified, you must use forward slashes
  261. # instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
  262. # If a drive letter is omitted, the drive on which httpd.exe is located
  263. # will be used by default. It is recommended that you always supply
  264. # an explicit drive letter in absolute paths to avoid confusion.
  265.  
  266. #
  267. # ServerRoot: The top of the directory tree under which the server's
  268. # configuration, error, and log files are kept.
  269. #
  270. # Do not add a slash at the end of the directory path. If you point
  271. # ServerRoot at a non-local disk, be sure to specify a local disk on the
  272. # Mutex directive, if file-based mutexes are used. If you wish to share the
  273. # same ServerRoot for multiple httpd daemons, you will need to change at
  274. # least PidFile.
  275. #
  276. ServerRoot "D:/Server/apache/"
  277.  
  278. #
  279. # Mutex: Allows you to set the mutex mechanism and mutex file directory
  280. # for individual mutexes, or change the global defaults
  281. #
  282. # Uncomment and change the directory if mutexes are file-based and the default
  283. # mutex file directory is not on a local disk or is not appropriate for some
  284. # other reason.
  285. #
  286. # Mutex default:logs
  287.  
  288. #
  289. # Listen: Allows you to bind Apache to specific IP addresses and/or
  290. # ports, instead of the default. See also the <VirtualHost>
  291. # directive.
  292. #
  293. # Change this to Listen on specific IP addresses as shown below to
  294. # prevent Apache from glomming onto all bound IP addresses.
  295. #
  296. #Listen 12.34.56.78:80
  297. Listen 80
  298. #Listen 443
  299.  
  300. #
  301. # Dynamic Shared Object (DSO) Support
  302. #
  303. # To be able to use the functionality of a module which was built as a DSO you
  304. # have to place corresponding `LoadModule' lines at this location so the
  305. # directives contained in it are actually available _before_ they are used.
  306. # Statically compiled modules (those listed by `httpd -l') do not need
  307. # to be loaded here.
  308. #
  309. # Example:
  310. # LoadModule foo_module modules/mod_foo.so
  311.  
  312. LoadModule access_compat_module modules/mod_access_compat.so
  313. #LoadModule mpm_winnt_module
  314. LoadModule authz_core_module modules/mod_authz_core.so
  315. LoadModule deflate_module modules/mod_deflate.so
  316. LoadModule dir_module modules/mod_dir.so
  317. LoadModule expires_module modules/mod_expires.so
  318. LoadModule ext_filter_module modules/mod_ext_filter.so
  319. LoadModule file_cache_module modules/mod_file_cache.so
  320. LoadModule filter_module modules/mod_filter.so
  321. LoadModule headers_module modules/mod_headers.so
  322. LoadModule log_config_module modules/mod_log_config.so
  323. LoadModule mime_module modules/mod_mime.so
  324. LoadModule rewrite_module modules/mod_rewrite.so
  325. LoadModule setenvif_module modules/mod_setenvif.so
  326. LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
  327. LoadModule ssl_module modules/mod_ssl.so
  328.  
  329.  
  330. ServerAdmin strtofloat@yandex.ru
  331.  
  332.  
  333. ServerName mos-voda.com
  334.  
  335.  
  336.  
  337. DocumentRoot "D:/Server/apache/htdocs"
  338.  
  339. <Directory "D:/Server/apache/htdocs">
  340.  
  341. Options Indexes
  342. Options +FollowSymLinks -SymLinksIfOwnerMatch
  343.  
  344.  
  345. Require all granted
  346. </Directory>
  347.  
  348. #
  349. # DirectoryIndex: sets the file that Apache will serve if a directory
  350. # is requested.
  351. #
  352. <IfModule dir_module>
  353. DirectoryIndex index.php index.html
  354. </IfModule>
  355.  
  356. #
  357. # The following lines prevent .htaccess and .htpasswd files from being
  358. # viewed by Web clients.
  359. #
  360. <Files ".ht*">
  361. Require all denied
  362. </Files>
  363.  
  364.  
  365. ErrorLog "logs/error.log"
  366.  
  367.  
  368. LogLevel warn
  369. #LogLevel debug
  370. <IfModule log_config_module>
  371. #
  372. # The following directives define some format nicknames for use with
  373. # a CustomLog directive (see below).
  374. #
  375. #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  376. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" **%T/%D**" combined
  377. #LogFormat "%h %l %u %t \"%r\" %>s %b" common
  378.  
  379. <IfModule logio_module>
  380. # You need to enable mod_logio.c to use %I and %O
  381. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  382.  
  383. </IfModule>
  384.  
  385. #
  386. # The location and format of the access logfile (Common Logfile Format).
  387. # If you do not define any access logfiles within a <VirtualHost>
  388. # container, they will be logged here. Contrariwise, if you *do*
  389. # define per-<VirtualHost> access logfiles, transactions will be
  390. # logged therein and *not* in this file.
  391. #
  392. CustomLog "logs/access.log" common
  393.  
  394. #
  395. # If you prefer a logfile with access, agent, and referer information
  396. # (Combined Logfile Format) you can use the following directive.
  397. #
  398. #CustomLog "logs/access.log" combined
  399. </IfModule>
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407. <IfModule mime_module>
  408. #
  409. # TypesConfig points to the file containing the list of mappings from
  410. # filename extension to MIME-type.
  411. #
  412. TypesConfig conf/mime.types
  413.  
  414. #
  415. # AddType allows you to add to or override the MIME configuration
  416. # file specified in TypesConfig for specific file types.
  417. #
  418. #AddType application/x-gzip .tgz
  419. #
  420. # AddEncoding allows you to have certain browsers uncompress
  421. # information on the fly. Note: Not all browsers support this.
  422. #
  423. #AddEncoding x-compress .Z
  424. #AddEncoding x-gzip .gz .tgz
  425. #
  426. # If the AddEncoding directives above are commented-out, then you
  427. # probably should define those extensions to indicate media types:
  428. #
  429. #AddType application/x-compress .Z
  430. #AddType application/x-gzip .gz .tgz
  431.  
  432. #
  433. # AddHandler allows you to map certain file extensions to "handlers":
  434. # actions unrelated to filetype. These can be either built into the server
  435. # or added with the Action directive (see below)
  436. #
  437. # To use CGI scripts outside of ScriptAliased directories:
  438. # (You will also need to add "ExecCGI" to the "Options" directive.)
  439. #
  440. #AddHandler cgi-script .cgi
  441.  
  442. # For type maps (negotiated resources):
  443. #AddHandler type-map var
  444.  
  445. #
  446. # Filters allow you to process content before it is sent to the client.
  447. #
  448. # To parse .shtml files for server-side includes (SSI):
  449. # (You will also need to add "Includes" to the "Options" directive.)
  450. #
  451. #AddType text/html .shtml
  452. #AddOutputFilter INCLUDES .shtml
  453. </IfModule>
  454.  
  455. #
  456. # The mod_mime_magic module allows the server to use various hints from the
  457. # contents of the file itself to determine its type. The MIMEMagicFile
  458. # directive tells the module where the hint definitions are located.
  459. #
  460. #MIMEMagicFile conf/magic
  461.  
  462. #
  463. # Customizable error responses come in three flavors:
  464. # 1) plain text 2) local redirects 3) external redirects
  465. #
  466. # Some examples:
  467. #ErrorDocument 500 "The server made a boo boo."
  468. #ErrorDocument 404 /missing.html
  469. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  470. #ErrorDocument 402 http://www.example.com/subscription_info.html
  471. #
  472.  
  473. #
  474. # MaxRanges: Maximum number of Ranges in a request before
  475. # returning the entire resource, or one of the special
  476. # values 'default', 'none' or 'unlimited'.
  477. # Default setting is to accept 200 Ranges.
  478. #MaxRanges unlimited
  479.  
  480. #
  481. # EnableMMAP and EnableSendfile: On systems that support it,
  482. # memory-mapping or the sendfile syscall may be used to deliver
  483. # files. This usually improves server performance, but must
  484. # be turned off when serving from networked-mounted
  485. # filesystems or if support for these functions is otherwise
  486. # broken on your system.
  487. # Defaults: EnableMMAP On, EnableSendfile Off
  488. #
  489. #EnableMMAP off
  490. #EnableSendfile Off
  491. #выше врублено
  492. # Supplemental configuration
  493. #
  494. # The configuration files in the conf/extra/ directory can be
  495. # included to add extra features or to modify the default configuration of
  496. # the server, or you may simply copy their contents here and change as
  497. # necessary.
  498.  
  499. # Server-pool management (MPM specific)
  500. #Include conf/extra/httpd-mpm.conf
  501.  
  502. # Multi-language error messages
  503. #Include conf/extra/httpd-multilang-errordoc.conf
  504.  
  505. # Fancy directory listings
  506. #Include conf/extra/httpd-autoindex.conf
  507.  
  508. # Language settings
  509. #Include conf/extra/httpd-languages.conf
  510.  
  511. # User home directories
  512. #Include conf/extra/httpd-userdir.conf
  513.  
  514. # Real-time info on requests and configuration
  515. #Include conf/extra/httpd-info.conf
  516.  
  517. # Virtual hosts
  518. #Include conf/extra/httpd-vhosts.conf
  519.  
  520. # Local access to the Apache HTTP Server Manual
  521. #Include conf/extra/httpd-manual.conf
  522.  
  523. # Distributed authoring and versioning (WebDAV)
  524. #Include conf/extra/httpd-dav.conf
  525.  
  526. # Various default settings
  527. #Include conf/extra/httpd-default.conf
  528.  
  529. ####################### Configure mod_proxy_html to understand HTML4/XHTML1
  530. #<IfModule proxy_html_module>
  531. #Include conf/extra/proxy-html.conf
  532. #</IfModule>
  533.  
  534. # Secure (SSL/TLS) connections
  535. Include conf/extra/httpd-ssl.conf
  536. #
  537. # Note: The following must must be present to support
  538. # starting without SSL on platforms with no /dev/random equivalent
  539. # but a statically compiled-in mod_ssl.
  540. #
  541.  
  542.  
  543. <IfModule ssl_module>
  544. SSLRandomSeed startup builtin
  545. SSLRandomSeed connect builtin
  546. </IfModule>
  547.  
  548.  
  549.  
  550.  
  551. #
  552. # uncomment out the below to deal with user agents that deliberately
  553. # violate open standards by misusing DNT (DNT *must* be a specific
  554. # end-user choice)
  555. #
  556. #<IfModule setenvif_module>
  557. #BrowserMatch "MSIE 10.0;" bad_DNT
  558. #</IfModule>
  559. #<IfModule headers_module>
  560. #RequestHeader unset DNT env=bad_DNT
  561. #</IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement