Advertisement
Spaniard89

ApacheConf

May 2nd, 2016
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 10.00 KB | None | 0 0
  1. ServerTokens OS
  2. ServerRoot "/etc/httpd"
  3. PidFile run/httpd.pid
  4. Timeout 120
  5. KeepAlive On
  6. MaxKeepAliveRequests 100
  7.  
  8. KeepAliveTimeout 15
  9.  
  10. Include conf.modules.d/*.conf
  11.  
  12. <IfModule prefork.c>
  13. StartServers       256
  14. MinSpareServers    5
  15. MaxSpareServers   20
  16. ServerLimit      1024
  17. MaxClients       1024
  18. MaxRequestsPerChild  40000
  19. </IfModule>
  20.  
  21. <IfModule worker.c>
  22. StartServers         4
  23. MaxClients         300
  24. MinSpareThreads     25
  25. MaxSpareThreads     75
  26. ThreadsPerChild     25
  27. MaxRequestsPerChild  0
  28. </IfModule>
  29.  
  30. Listen 8080
  31. Listen 8081
  32.  
  33. LoadModule authn_core_module modules/mod_authn_core.so
  34. LoadModule access_compat_module modules/mod_access_compat.so
  35. LoadModule authz_host_module modules/mod_authz_host.so
  36. LoadModule auth_basic_module modules/mod_auth_basic.so
  37. LoadModule auth_digest_module modules/mod_auth_digest.so
  38. LoadModule authn_file_module modules/mod_authn_file.so
  39. #LoadModule authn_alias_module modules/mod_authn_alias.so (For more info: https://tickets.puppetlabs.com/browse/MODULES-97)
  40. LoadModule authn_anon_module modules/mod_authn_anon.so
  41. LoadModule authn_dbm_module modules/mod_authn_dbm.so
  42. #LoadModule authn_default_module modules/mod_authn_default.so (For more info: https://httpd.apache.org/docs/current/upgrading.html)
  43. LoadModule authz_user_module modules/mod_authz_user.so
  44. LoadModule authz_owner_module modules/mod_authz_owner.so
  45. LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
  46. LoadModule authz_dbm_module modules/mod_authz_dbm.so
  47. #LoadModule authz_default_module modules/mod_authz_default.so (For more info: https://httpd.apache.org/docs/current/upgrading.html)
  48. #LoadModule ldap_module modules/mod_ldap.so
  49. #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
  50. LoadModule include_module modules/mod_include.so
  51. LoadModule log_config_module modules/mod_log_config.so
  52. LoadModule logio_module modules/mod_logio.so
  53. LoadModule env_module modules/mod_env.so
  54. LoadModule ext_filter_module modules/mod_ext_filter.so
  55. LoadModule mime_magic_module modules/mod_mime_magic.so
  56. LoadModule expires_module modules/mod_expires.so
  57. LoadModule deflate_module modules/mod_deflate.so
  58. LoadModule headers_module modules/mod_headers.so
  59. LoadModule usertrack_module modules/mod_usertrack.so
  60. LoadModule setenvif_module modules/mod_setenvif.so
  61. LoadModule mime_module modules/mod_mime.so
  62. LoadModule dav_module modules/mod_dav.so
  63. LoadModule status_module modules/mod_status.so
  64. LoadModule autoindex_module modules/mod_autoindex.so
  65. LoadModule info_module modules/mod_info.so
  66. LoadModule dav_fs_module modules/mod_dav_fs.so
  67. LoadModule vhost_alias_module modules/mod_vhost_alias.so
  68. LoadModule negotiation_module modules/mod_negotiation.so
  69. LoadModule dir_module modules/mod_dir.so
  70. LoadModule actions_module modules/mod_actions.so
  71. LoadModule speling_module modules/mod_speling.so
  72. LoadModule userdir_module modules/mod_userdir.so
  73. LoadModule alias_module modules/mod_alias.so
  74. LoadModule substitute_module modules/mod_substitute.so
  75. LoadModule rewrite_module modules/mod_rewrite.so
  76. LoadModule proxy_module modules/mod_proxy.so
  77. LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
  78. LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
  79. LoadModule proxy_http_module modules/mod_proxy_http.so
  80. LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
  81. LoadModule proxy_connect_module modules/mod_proxy_connect.so
  82. LoadModule cache_module modules/mod_cache.so
  83. LoadModule suexec_module modules/mod_suexec.so
  84. #LoadModule disk_cache_module modules/mod_disk_cache.so
  85. LoadModule cgi_module modules/mod_cgi.so
  86. LoadModule version_module modules/mod_version.so
  87. LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
  88. LoadModule unixd_module modules/mod_unixd.so
  89. LoadModule filter_module modules/mod_filter.so
  90. LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
  91.  
  92. Include conf.d/*.conf
  93.  
  94. User apache
  95. Group apache
  96.  
  97. ServerAdmin root@localhost
  98.  
  99. UseCanonicalName Off
  100.  
  101. DocumentRoot "/var/www/html/deals/public"
  102.  
  103. <Directory />
  104.     Require all denied
  105.     AllowOverride None
  106.     Options None
  107. </Directory>
  108.  
  109.  
  110. <Directory "/var/www/html/deals/public">
  111.     Require all granted
  112.     AllowOverride All
  113.     Options FollowSymLinks
  114. </Directory>
  115.  
  116. <LocationMatch "/deals/backend">
  117.     Order deny,allow
  118.     Deny from All
  119.  
  120.     Allow from 10.0.0.0/8
  121.     Allow from 172.16.0.0/12
  122.     Allow from 192.168.0.0/16
  123.  
  124.     Allow from 89.202.42.64/26
  125.  
  126.     Allow from 89.244.147.200
  127.     Allow from 92.50.76.50
  128. </LocationMatch>
  129.  
  130. <IfModule mod_userdir.c>
  131.     UserDir disabled
  132. </IfModule>
  133.  
  134. DirectoryIndex index.html index.html.var
  135.  
  136. AccessFileName .htaccess
  137.  
  138.  
  139. <Files ~ "^\.ht">
  140.     Order deny,allow
  141.     Deny from All
  142. </Files>
  143.  
  144. TypesConfig /etc/mime.types
  145.  
  146. DefaultType text/plain
  147.  
  148. <IfModule mod_mime_magic.c>
  149. #   MIMEMagicFile /usr/share/magic.mime
  150.     MIMEMagicFile conf/magic
  151. </IfModule>
  152.  
  153. HostnameLookups Off
  154.  
  155. ErrorLog logs/error_log
  156.  
  157. LogLevel info
  158.  
  159. LogFormat "HTTPS:%{HTTPS}i %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  160. #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  161. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  162. LogFormat "%{Referer}i -> %U" referer
  163. LogFormat "%{User-agent}i" agent
  164.  
  165. CustomLog logs/access_log common
  166.  
  167. CustomLog logs/access_log combined
  168.  
  169. ServerSignature On
  170.  
  171. Alias /icons/ "/var/www/icons/"
  172.  
  173. <Directory "/var/www/icons">
  174.     Options Indexes MultiViews FollowSymLinks
  175.     AllowOverride None
  176.     Order allow,deny
  177.     Allow from all
  178. </Directory>
  179.  
  180.  
  181. <IfModule mod_dav_fs.c>
  182.     # Location of the WebDAV lock database.
  183.     DAVLockDB /var/lib/dav/lockdb
  184. </IfModule>
  185.  
  186. ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
  187.  
  188. <Directory "/var/www/cgi-bin">
  189.     AllowOverride None
  190.     Options None
  191.     Order allow,deny
  192.     Allow from all
  193. </Directory>
  194.  
  195. AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  196.  
  197. AddIconByType (TXT,/icons/text.gif) text/*
  198. AddIconByType (IMG,/icons/image2.gif) image/*
  199. AddIconByType (SND,/icons/sound2.gif) audio/*
  200. AddIconByType (VID,/icons/movie.gif) video/*
  201.  
  202. AddIcon /icons/binary.gif .bin .exe
  203. AddIcon /icons/binhex.gif .hqx
  204. AddIcon /icons/tar.gif .tar
  205. AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  206. AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  207. AddIcon /icons/a.gif .ps .ai .eps
  208. AddIcon /icons/layout.gif .html .shtml .htm .pdf
  209. AddIcon /icons/text.gif .txt
  210. AddIcon /icons/c.gif .c
  211. AddIcon /icons/p.gif .pl .py
  212. AddIcon /icons/f.gif .for
  213. AddIcon /icons/dvi.gif .dvi
  214. AddIcon /icons/uuencoded.gif .uu
  215. AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  216. AddIcon /icons/tex.gif .tex
  217. AddIcon /icons/bomb.gif core
  218.  
  219. AddIcon /icons/back.gif ..
  220. AddIcon /icons/hand.right.gif README
  221. AddIcon /icons/folder.gif ^^DIRECTORY^^
  222. AddIcon /icons/blank.gif ^^BLANKICON^^
  223.  
  224.  
  225. DefaultIcon /icons/unknown.gif
  226.  
  227. ReadmeName README.html
  228. HeaderName HEADER.html
  229.  
  230. IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
  231.  
  232. AddLanguage ca .ca
  233. AddLanguage cs .cz .cs
  234. AddLanguage da .dk
  235. AddLanguage de .de
  236. AddLanguage el .el
  237. AddLanguage en .en
  238. AddLanguage eo .eo
  239. AddLanguage es .es
  240. AddLanguage et .et
  241. AddLanguage fr .fr
  242. AddLanguage he .he
  243. AddLanguage hr .hr
  244. AddLanguage it .it
  245. AddLanguage ja .ja
  246. AddLanguage ko .ko
  247. AddLanguage ltz .ltz
  248. AddLanguage nl .nl
  249. AddLanguage nn .nn
  250. AddLanguage no .no
  251. AddLanguage pl .po
  252. AddLanguage pt .pt
  253. AddLanguage pt-BR .pt-br
  254. AddLanguage ru .ru
  255. AddLanguage sv .sv
  256. AddLanguage zh-CN .zh-cn
  257. AddLanguage zh-TW .zh-tw
  258.  
  259. 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
  260.  
  261. ForceLanguagePriority Prefer Fallback
  262.  
  263. AddDefaultCharset UTF-8
  264.  
  265. AddType application/x-compress .Z
  266. AddType application/x-gzip .gz .tgz
  267.  
  268. AddType application/x-x509-ca-cert .crt
  269. AddType application/x-pkcs7-crl    .crl
  270.  
  271. AddHandler type-map var
  272.  
  273. AddType text/html .shtml
  274. AddOutputFilter INCLUDES .shtml
  275.  
  276. Alias /error/ "/var/www/error/"
  277.  
  278. <IfModule mod_negotiation.c>
  279. <IfModule mod_include.c>
  280.     <Directory "/var/www/error">
  281.         AllowOverride None
  282.         Options IncludesNoExec
  283.         AddOutputFilter Includes html
  284.         AddHandler type-map var
  285.         Order allow,deny
  286.         Allow from all
  287.         LanguagePriority en es de fr
  288.         ForceLanguagePriority Prefer Fallback
  289.     </Directory>
  290.  
  291. </IfModule>
  292. </IfModule>
  293.  
  294. BrowserMatch "Mozilla/2" nokeepalive
  295. BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  296. BrowserMatch "RealPlayer 4\.0" force-response-1.0
  297. BrowserMatch "Java/1\.0" force-response-1.0
  298. BrowserMatch "JDK/1\.0" force-response-1.0
  299.  
  300. BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
  301. BrowserMatch "MS FrontPage" redirect-carefully
  302. BrowserMatch "^WebDrive" redirect-carefully
  303. BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
  304. BrowserMatch "^gnome-vfs/1.0" redirect-carefully
  305. BrowserMatch "^XML Spy" redirect-carefully
  306. BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
  307.  
  308. <IfModule mod_deflate.c>
  309. SetEnv mod_deflate On
  310. # Insert filter
  311. SetOutputFilter DEFLATE
  312. # Netscape 4.x has some problems...
  313. BrowserMatch ^Mozilla/4 gzip-only-text/html
  314.  
  315. # Netscape 4.06-4.08 have some more problems
  316. BrowserMatch ^Mozilla/4\.0[678] no-gzip
  317.  
  318. # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
  319. # the above regex won't work. You can use the following
  320. # workaround to get the desired effect:
  321. BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
  322.  
  323. # Don't compress images
  324. SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|ico)$ no-gzip
  325. </IfModule>
  326.  
  327. <IfModule mod_expires.c>
  328. SetEnv mod_expires On
  329. ExpiresActive On
  330. ExpiresByType image/png "access plus 2 days"
  331. ExpiresByType image/gif "access plus 2 days"
  332. ExpiresByType image/jpeg "access plus 2 days"
  333. ExpiresByType image/vnd.microsoft.icon "access plus 2 days"
  334. ExpiresByType text/css "access plus 2 hours"
  335. ExpiresByType application/x-javascript "access plus 2 hours"
  336. ExpiresByType application/javascript "access plus 2 hours"
  337. ExpiresByType text/javascript "access plus 2 hours"
  338. </IfModule>
  339.  
  340. <VirtualHost 127.0.0.1:8080>
  341.     ErrorLog logs/localhost-error_log
  342.     CustomLog logs/localhost-access_log combined
  343. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement