Advertisement
Guest User

Apache config Open Server

a guest
Feb 15th, 2013
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.81 KB | None | 0 0
  1. #---------------------------------------------#
  2. # Основная конфигурация сервера
  3. #---------------------------------------------#
  4.  
  5. ServerRoot "%sprogdir%/modules/http/%httpdriver%"
  6. DocumentRoot "%ssitedir%/"
  7. Listen %ip%:%httpport%
  8. Listen %ip%:%httpsport%
  9. NameVirtualHost %ip%:%httpport%
  10. NameVirtualHost %ip%:%httpsport%
  11. ServerName %ips%
  12. ServerTokens Prod
  13. ServerSignature Off
  14. Timeout 300
  15. KeepAlive On
  16. MaxKeepAliveRequests 100
  17. KeepAliveTimeout 5
  18. UseCanonicalName Off
  19. AccessFileName .htaccess
  20. HostnameLookups Off
  21. ExtendedStatus On
  22. PidFile "%sprogdir%/userdata/temp/httpd.pid"
  23. ThreadsPerChild 32
  24. ThreadStackSize 8388608
  25. MaxRequestsPerChild 0
  26. MaxRanges 200
  27. EnableMMAP off
  28. EnableSendfile off
  29. Win32DisableAcceptEx On
  30. ScriptInterpreterSource script
  31. %httpcharset%
  32.  
  33. #---------------------------------------------#
  34. # Подключение модулей
  35. #---------------------------------------------#
  36.  
  37. LoadModule actions_module modules/mod_actions.so
  38. LoadModule alias_module modules/mod_alias.so
  39. LoadModule asis_module modules/mod_asis.so
  40. LoadModule auth_basic_module modules/mod_auth_basic.so
  41. #LoadModule auth_digest_module modules/mod_auth_digest.so
  42. #LoadModule authn_alias_module modules/mod_authn_alias.so
  43. #LoadModule authn_anon_module modules/mod_authn_anon.so
  44. #LoadModule authn_dbd_module modules/mod_authn_dbd.so
  45. #LoadModule authn_dbm_module modules/mod_authn_dbm.so
  46. LoadModule authn_default_module modules/mod_authn_default.so
  47. LoadModule authn_file_module modules/mod_authn_file.so
  48. #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
  49. #LoadModule authz_dbm_module modules/mod_authz_dbm.so
  50. LoadModule authz_default_module modules/mod_authz_default.so
  51. LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
  52. LoadModule authz_host_module modules/mod_authz_host.so
  53. #LoadModule authz_owner_module modules/mod_authz_owner.so
  54. LoadModule authz_user_module modules/mod_authz_user.so
  55. LoadModule autoindex_module modules/mod_autoindex.so
  56. #LoadModule cache_module modules/mod_cache.so
  57. #LoadModule cern_meta_module modules/mod_cern_meta.so
  58. LoadModule cgi_module modules/mod_cgi.so
  59. #LoadModule charset_lite_module modules/mod_charset_lite.so
  60. #LoadModule dav_module modules/mod_dav.so
  61. #LoadModule dav_fs_module modules/mod_dav_fs.so
  62. #LoadModule dav_lock_module modules/mod_dav_lock.so
  63. #LoadModule dbd_module modules/mod_dbd.so
  64. #LoadModule deflate_module modules/mod_deflate.so
  65. LoadModule dir_module modules/mod_dir.so
  66. #LoadModule disk_cache_module modules/mod_disk_cache.so
  67. #LoadModule dumpio_module modules/mod_dumpio.so
  68. LoadModule env_module modules/mod_env.so
  69. #LoadModule expires_module modules/mod_expires.so
  70. #LoadModule ext_filter_module modules/mod_ext_filter.so
  71. #LoadModule file_cache_module modules/mod_file_cache.so
  72. #LoadModule filter_module modules/mod_filter.so
  73. LoadModule headers_module modules/mod_headers.so
  74. #LoadModule ident_module modules/mod_ident.so
  75. #LoadModule imagemap_module modules/mod_imagemap.so
  76. LoadModule include_module modules/mod_include.so
  77. #LoadModule info_module modules/mod_info.so
  78. LoadModule isapi_module modules/mod_isapi.so
  79. #LoadModule ldap_module modules/mod_ldap.so
  80. #LoadModule logio_module modules/mod_logio.so
  81. LoadModule log_config_module modules/mod_log_config.so
  82. #LoadModule log_forensic_module modules/mod_log_forensic.so
  83. #LoadModule mem_cache_module modules/mod_mem_cache.so
  84. LoadModule mime_module modules/mod_mime.so
  85. #LoadModule mime_magic_module modules/mod_mime_magic.so
  86. LoadModule negotiation_module modules/mod_negotiation.so
  87. #LoadModule proxy_module modules/mod_proxy.so
  88. #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
  89. #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
  90. #LoadModule proxy_connect_module modules/mod_proxy_connect.so
  91. #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
  92. #LoadModule proxy_http_module modules/mod_proxy_http.so
  93. #LoadModule reqtimeout_module modules/mod_reqtimeout.so
  94. LoadModule rewrite_module modules/mod_rewrite.so
  95. LoadModule setenvif_module modules/mod_setenvif.so
  96. #LoadModule speling_module modules/mod_speling.so
  97. LoadModule ssl_module modules/mod_ssl.so
  98. LoadModule status_module modules/mod_status.so
  99. #LoadModule substitute_module modules/mod_substitute.so
  100. #LoadModule unique_id_module modules/mod_unique_id.so
  101. #LoadModule userdir_module modules/mod_userdir.so
  102. #LoadModule usertrack_module modules/mod_usertrack.so
  103. #LoadModule version_module modules/mod_version.so
  104. #LoadModule vhost_alias_module modules/mod_vhost_alias.so
  105. PHPINIDir "%sprogdir%/userdata/temp/config"
  106. LoadModule php5_module "%sprogdir%/modules/php/%phpdriver%/php5apache2_2.dll"
  107.  
  108. #---------------------------------------------#
  109. # Настройка прав доступа к серверу
  110. #---------------------------------------------#
  111.  
  112. <Directory />
  113. Options FollowSymLinks
  114. AllowOverride None
  115. Order Deny,Allow
  116. Deny from all
  117. </Directory>
  118. <Directory "%ssitedir%/*">
  119. AllowOverride All
  120. Options -MultiViews +Indexes +FollowSymLinks +IncludesNoExec +Includes +ExecCGI
  121. <LimitExcept GET POST HEAD>
  122. Order deny,allow
  123. Deny from all
  124. </LimitExcept>
  125. </Directory>
  126. <Directory "%sprogdir%/modules/system/html/openserver">
  127. AllowOverride None
  128. Options -MultiViews -Indexes -FollowSymLinks -IncludesNoExec -Includes -ExecCGI
  129. Order deny,allow
  130. Deny from all
  131. Allow from 127.0.0.0/8 ::1/128
  132. Allow from %ips%
  133. %allow%Allow from all
  134. <LimitExcept GET POST HEAD>
  135. Order deny,allow
  136. Deny from all
  137. </LimitExcept>
  138. AddDefaultCharset Off
  139. <IfModule dir_module>
  140. DirectoryIndex index.php
  141. </IfModule>
  142. </Directory>
  143. <Directory "%sprogdir%/modules/system/html/default">
  144. AllowOverride None
  145. Options -MultiViews -Indexes -FollowSymLinks -IncludesNoExec -Includes -ExecCGI
  146. Order deny,allow
  147. Allow from all
  148. <LimitExcept GET POST HEAD>
  149. Order deny,allow
  150. Deny from all
  151. </LimitExcept>
  152. AddDefaultCharset Off
  153. <IfModule dir_module>
  154. DirectoryIndex index.html
  155. </IfModule>
  156. </Directory>
  157. <Directory "/cgi-bin">
  158. AllowOverride None
  159. Options None
  160. Order allow,deny
  161. Allow from all
  162. </Directory>
  163. <FilesMatch "^\.ht">
  164. Require all denied
  165. </FilesMatch>
  166. <IfModule alias_module>
  167. Alias /openserver/ "%sprogdir%/modules/system/html/openserver/"
  168. </IfModule>
  169.  
  170. #---------------------------------------------#
  171. # Конфигурация сообщений об ошибках
  172. #---------------------------------------------#
  173.  
  174. ErrorLog "%sprogdir%/userdata/logs/%httpdriver%_error.log"
  175. LogLevel warn
  176.  
  177. <IfModule log_config_module>
  178. LogFormat "%v: %a %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  179. LogFormat "%v: %a %t \"%r\" %>s %b" common
  180.  
  181. <IfModule logio_module>
  182. # You need to enable mod_logio.c to use %I and %O
  183. LogFormat "%v: %a %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  184. </IfModule>
  185. CustomLog "%sprogdir%/userdata/logs/%httpdriver%_queries.log" combined
  186. </IfModule>
  187.  
  188. #ErrorDocument 500 "The server made a boo boo."
  189. #ErrorDocument 404 /missing.html
  190. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  191. #ErrorDocument 402 http://ret.ru/subscription_info.html
  192.  
  193. # Multi-language error messages
  194. Alias /apacheerror/ "%sprogdir%/modules/http/%httpdriver%/error/"
  195.  
  196. <Directory "%sprogdir%/modules/http/%httpdriver%/error">
  197. AllowOverride None
  198. Options IncludesNoExec
  199. AddOutputFilter Includes html
  200. AddHandler type-map var
  201. Order allow,deny
  202. Allow from all
  203. LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr
  204. ForceLanguagePriority Prefer Fallback
  205. </Directory>
  206.  
  207. ErrorDocument 400 /apacheerror/HTTP_BAD_REQUEST.html.var
  208. ErrorDocument 401 /apacheerror/HTTP_UNAUTHORIZED.html.var
  209. ErrorDocument 403 /apacheerror/HTTP_FORBIDDEN.html.var
  210. ErrorDocument 404 /apacheerror/HTTP_NOT_FOUND.html.var
  211. ErrorDocument 405 /apacheerror/HTTP_METHOD_NOT_ALLOWED.html.var
  212. ErrorDocument 408 /apacheerror/HTTP_REQUEST_TIME_OUT.html.var
  213. ErrorDocument 410 /apacheerror/HTTP_GONE.html.var
  214. ErrorDocument 411 /apacheerror/HTTP_LENGTH_REQUIRED.html.var
  215. ErrorDocument 412 /apacheerror/HTTP_PRECONDITION_FAILED.html.var
  216. ErrorDocument 413 /apacheerror/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
  217. ErrorDocument 414 /apacheerror/HTTP_REQUEST_URI_TOO_LARGE.html.var
  218. ErrorDocument 415 /apacheerror/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
  219. ErrorDocument 500 /apacheerror/HTTP_INTERNAL_SERVER_ERROR.html.var
  220. ErrorDocument 501 /apacheerror/HTTP_NOT_IMPLEMENTED.html.var
  221. ErrorDocument 502 /apacheerror/HTTP_BAD_GATEWAY.html.var
  222. ErrorDocument 503 /apacheerror/HTTP_SERVICE_UNAVAILABLE.html.var
  223. ErrorDocument 506 /apacheerror/HTTP_VARIANT_ALSO_VARIES.html.var
  224.  
  225. #---------------------------------------------#
  226. # Конфигурация MIME
  227. #---------------------------------------------#
  228.  
  229. DefaultType text/plain
  230.  
  231. <IfModule mime_module>
  232. #
  233. # TypesConfig points to the file containing the list of mappings from
  234. # filename extension to MIME-type.
  235. #
  236. TypesConfig conf/mime.types
  237.  
  238. #
  239. # AddType allows you to add to or override the MIME configuration
  240. # file specified in TypesConfig for specific file types.
  241. #
  242. #AddType application/x-gzip .tgz
  243. #
  244. # AddEncoding allows you to have certain browsers uncompress
  245. # information on the fly. Note: Not all browsers support this.
  246. #
  247. #AddEncoding x-compress .Z
  248. #AddEncoding x-gzip .gz .tgz
  249. #
  250. # If the AddEncoding directives above are commented-out, then you
  251. # probably should define those extensions to indicate media types:
  252. #
  253. AddType application/x-compress .Z
  254. AddType application/x-gzip .gz .tgz
  255.  
  256. #
  257. # AddHandler allows you to map certain file extensions to "handlers":
  258. # actions unrelated to filetype. These can be either built into the server
  259. # or added with the Action directive (see below)
  260. #
  261. # To use CGI scripts outside of ScriptAliased directories:
  262. # (You will also need to add "ExecCGI" to the "Options" directive.)
  263. #
  264. AddHandler cgi-script .cgi .pl
  265. AddType application/x-httpd-php .php .php5 .phtml
  266.  
  267. # For type maps (negotiated resources):
  268. #AddHandler type-map var
  269.  
  270. #
  271. # Filters allow you to process content before it is sent to the client.
  272. #
  273. # To parse .shtml files for server-side includes (SSI):
  274. # (You will also need to add "Includes" to the "Options" directive.)
  275. #
  276. AddType text/html .shtml
  277. AddOutputFilter INCLUDES .shtml
  278. </IfModule>
  279.  
  280. #MIMEMagicFile conf/magic
  281.  
  282. #---------------------------------------------#
  283. # Конфигурация Index-а и иконок
  284. #---------------------------------------------#
  285.  
  286. <IfModule dir_module>
  287. DirectoryIndex index.php index.html index.htm index.pl
  288. </IfModule>
  289.  
  290. # Fancy directory listings
  291. IndexOptions FancyIndexing HTMLTable VersionSort
  292.  
  293. Alias /apacheicons/ "%sprogdir%/modules/http/%httpdriver%/icons/"
  294.  
  295. <Directory "%sprogdir%/modules/http/%httpdriver%/icons">
  296. Options Indexes MultiViews
  297. AllowOverride None
  298. Order allow,deny
  299. Allow from all
  300. </Directory>
  301.  
  302. AddIconByEncoding (CMP,/apacheicons/compressed.gif) x-compress x-gzip
  303.  
  304. AddIconByType (TXT,/apacheicons/text.gif) text/*
  305. AddIconByType (IMG,/apacheicons/image2.gif) image/*
  306. AddIconByType (SND,/apacheicons/sound2.gif) audio/*
  307. AddIconByType (VID,/apacheicons/movie.gif) video/*
  308.  
  309. AddIcon /apacheicons/binary.gif .bin .exe
  310. AddIcon /apacheicons/binhex.gif .hqx
  311. AddIcon /apacheicons/tar.gif .tar
  312. AddIcon /apacheicons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  313. AddIcon /apacheicons/compressed.gif .Z .z .tgz .gz .zip
  314. AddIcon /apacheicons/a.gif .ps .ai .eps
  315. AddIcon /apacheicons/layout.gif .html .shtml .htm .pdf
  316. AddIcon /apacheicons/text.gif .txt
  317. AddIcon /apacheicons/c.gif .c
  318. AddIcon /apacheicons/p.gif .pl .py
  319. AddIcon /apacheicons/f.gif .for
  320. AddIcon /apacheicons/dvi.gif .dvi
  321. AddIcon /apacheicons/uuencoded.gif .uu
  322. AddIcon /apacheicons/script.gif .conf .sh .shar .csh .ksh .tcl
  323. AddIcon /apacheicons/tex.gif .tex
  324. AddIcon /apacheicons/bomb.gif core
  325.  
  326. AddIcon /apacheicons/back.gif ..
  327. AddIcon /apacheicons/hand.right.gif README
  328. AddIcon /apacheicons/folder.gif ^^DIRECTORY^^
  329. AddIcon /apacheicons/blank.gif ^^BLANKICON^^
  330.  
  331. DefaultIcon /apacheicons/unknown.gif
  332.  
  333. #AddDescription "GZIP compressed document" .gz
  334. #AddDescription "tar archive" .tar
  335. #AddDescription "GZIP compressed tar archive" .tgz
  336.  
  337. ReadmeName README.html
  338. HeaderName HEADER.html
  339.  
  340. IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
  341.  
  342. #---------------------------------------------#
  343. # Подключение языков и кодировок
  344. #---------------------------------------------#
  345.  
  346. AddLanguage ca .ca
  347. AddLanguage cs .cz .cs
  348. AddLanguage da .dk
  349. AddLanguage de .de
  350. AddLanguage el .el
  351. AddLanguage en .en
  352. AddLanguage eo .eo
  353. AddLanguage es .es
  354. AddLanguage et .et
  355. AddLanguage fr .fr
  356. AddLanguage he .he
  357. AddLanguage hr .hr
  358. AddLanguage it .it
  359. AddLanguage ja .ja
  360. AddLanguage ko .ko
  361. AddLanguage ltz .ltz
  362. AddLanguage nl .nl
  363. AddLanguage nn .nn
  364. AddLanguage no .no
  365. AddLanguage pl .po
  366. AddLanguage pt .pt
  367. AddLanguage pt-BR .pt-br
  368. AddLanguage ru .ru
  369. AddLanguage sv .sv
  370. AddLanguage tr .tr
  371. AddLanguage zh-CN .zh-cn
  372. AddLanguage zh-TW .zh-tw
  373.  
  374. 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 tr zh-CN zh-TW
  375.  
  376. ForceLanguagePriority Prefer Fallback
  377.  
  378. AddCharset us-ascii.ascii .us-ascii
  379. AddCharset ISO-8859-1 .iso8859-1 .latin1
  380. AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
  381. AddCharset ISO-8859-3 .iso8859-3 .latin3
  382. AddCharset ISO-8859-4 .iso8859-4 .latin4
  383. AddCharset ISO-8859-5 .iso8859-5 .cyr .iso-ru
  384. AddCharset ISO-8859-6 .iso8859-6 .arb .arabic
  385. AddCharset ISO-8859-7 .iso8859-7 .grk .greek
  386. AddCharset ISO-8859-8 .iso8859-8 .heb .hebrew
  387. AddCharset ISO-8859-9 .iso8859-9 .latin5 .trk
  388. AddCharset ISO-8859-10 .iso8859-10 .latin6
  389. AddCharset ISO-8859-13 .iso8859-13
  390. AddCharset ISO-8859-14 .iso8859-14 .latin8
  391. AddCharset ISO-8859-15 .iso8859-15 .latin9
  392. AddCharset ISO-8859-16 .iso8859-16 .latin10
  393. AddCharset ISO-2022-JP .iso2022-jp .jis
  394. AddCharset ISO-2022-KR .iso2022-kr .kis
  395. AddCharset ISO-2022-CN .iso2022-cn .cis
  396. AddCharset Big5.Big5 .big5 .b5
  397. AddCharset cn-Big5 .cn-big5
  398. # For russian, more than one charset is used (depends on client, mostly):
  399. AddCharset WINDOWS-1251 .cp-1251 .win-1251
  400. AddCharset CP866 .cp866
  401. AddCharset KOI8 .koi8
  402. AddCharset KOI8-E .koi8-e
  403. AddCharset KOI8-r .koi8-r .koi8-ru
  404. AddCharset KOI8-U .koi8-u
  405. AddCharset KOI8-ru .koi8-uk .ua
  406. AddCharset ISO-10646-UCS-2 .ucs2
  407. AddCharset ISO-10646-UCS-4 .ucs4
  408. AddCharset UTF-7 .utf7
  409. AddCharset UTF-8 .utf8
  410. AddCharset UTF-16 .utf16
  411. AddCharset UTF-16BE .utf16be
  412. AddCharset UTF-16LE .utf16le
  413. AddCharset UTF-32 .utf32
  414. AddCharset UTF-32BE .utf32be
  415. AddCharset UTF-32LE .utf32le
  416. AddCharset euc-cn .euc-cn
  417. AddCharset euc-gb .euc-gb
  418. AddCharset euc-jp .euc-jp
  419. AddCharset euc-kr .euc-kr
  420. #Not sure how euc-tw got in - IANA doesn't list it???
  421. AddCharset EUC-TW .euc-tw
  422. AddCharset gb2312 .gb2312 .gb
  423. AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2
  424. AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4
  425. AddCharset shift_jis .shift_jis .sjis
  426.  
  427. #---------------------------------------------#
  428. # Конфигурация SSL
  429. #---------------------------------------------#
  430.  
  431. AddType application/x-x509-ca-cert .crt
  432. AddType application/x-pkcs7-crl .crl
  433. SSLMutex default
  434.  
  435. <IfModule ssl_module>
  436. SSLRandomSeed startup builtin
  437. SSLRandomSeed connect builtin
  438. SSLSessionCache none
  439. SSLSessionCacheTimeout 300
  440. SSLMutex default
  441. SSLVerifyClient none
  442. SSLProxyEngine off
  443. SSLProtocol -all +TLSv1 +SSLv3
  444. SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM
  445. SSLCertificateFile "%sprogdir%/userdata/config/server.crt"
  446. SSLCertificateKeyFile "%sprogdir%/userdata/config/server.key"
  447. </IfModule>
  448.  
  449. #---------------------------------------------#
  450. # Первичный виртуальный хост "по умолчанию"
  451. #---------------------------------------------#
  452. <VirtualHost %ip%:%httpport%>
  453. DocumentRoot "%sprogdir%/modules/system/html/default"
  454. ServerName "qastcoars-games.com" #Было default
  455. ServerAlias "www.qastcoars-games.com/" #Было default
  456. <Location /openserver/>
  457. Deny from all
  458. </Location>
  459. </VirtualHost>
  460. <VirtualHost %ip%:%httpsport%>
  461. SSLEngine on
  462. BrowserMatch ".*MSIE.*" \
  463. nokeepalive ssl-unclean-shutdown \
  464. downgrade-1.0 force-response-1.0
  465. DocumentRoot "%sprogdir%/modules/system/html/default"
  466. ServerName "qastcoars-games.com" #Было default
  467. ServerAlias "www.qastcoars-games.com" #Было default
  468. <Location /openserver/>
  469. Deny from all
  470. </Location>
  471. </VirtualHost>
  472. #---------------------------------------------#
  473. # Конец конфигурации хоста "по умолчанию" #
  474. #---------------------------------------------#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement