doblej

Untitled

Aug 3rd, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.29 KB | None | 0 0
  1. ServerName localhost
  2. ServerSignature Off
  3. ServerTokens Prod
  4. HostnameLookups Off
  5. DirectoryIndex /index.php index.php
  6.  
  7. LogFormat "%a %l %u %t \"%m %{Host}i%U%q %H\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %{ms}T" mycombined
  8.  
  9. RedirectMatch 404 /\\.svn(/|$)
  10.  
  11. <Files wp-login.php>
  12. RewriteCond %{HTTP:MIO} !=3232
  13. RewriteRule ^ - [G]
  14. </Files>
  15.  
  16. <Location /server-status>
  17. SetHandler server-status
  18. </Location>
  19.  
  20. <IfModule mod_proxy_fcgi.c>
  21. # Run php-fpm via proxy_fcgi
  22. <FilesMatch \.php$>
  23. SetHandler "proxy:unix:/run/php/php7.0-fpm.sock|fcgi://localhost"
  24. </FilesMatch>
  25. </IfModule>
  26.  
  27. <Directory /var/www >
  28. Options -Indexes +FollowSymLinks -SymLinksIfOwnerMatch -MultiViews -Includes
  29. Require all denied
  30. Require ip 127.0.0.1
  31. Require local
  32. </Directory>
  33.  
  34. <Files xmlrpc.php>
  35. Require all denied
  36. </Files>
  37.  
  38. #Asi evitamos llamadas a la api tipo /wp-json/wp/v2/users
  39. <DirectoryMatch /wp-json/*>
  40. Require all denied
  41. </DirectoryMatch>
  42.  
  43. <DirectoryMatch .*\.svn/.*>
  44. Require all denied
  45. </DirectoryMatch>
  46.  
  47. <Files license.txt>
  48. Require all denied
  49. </Files>
  50.  
  51. <Files wp-config-sample.php>
  52. Require all denied
  53. </Files>
  54.  
  55. <Files readme.html>
  56. Require all denied
  57. </Files>
  58.  
  59. <Files wp-config.php>
  60. Require all denied
  61. </Files>
  62.  
  63. FilterDeclare COMPRESS
  64. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/html'"
  65. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/css'"
  66. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/plain'"
  67. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/xml'"
  68. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/x-component'"
  69. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/javascript'"
  70. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/json'"
  71. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/xml'"
  72. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/xhtml+xml'"
  73. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/rss+xml'"
  74. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/atom+xml'"
  75. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/vnd.ms-fontobject'"
  76. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'image/svg+xml'"
  77. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'image/x-icon'"
  78. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/x-font-ttf'"
  79. FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'font/opentype'"
  80. FilterChain COMPRESS
  81. FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
  82.  
  83. #Compress everything Except Images
  84. BrowserMatch ^Mozilla/4 gzip-only-text/html
  85. BrowserMatch ^Mozilla/4\.0[678] no-gzip
  86. BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  87. SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|ico|swf)$ no-gzip dont-vary
  88.  
  89. Header append Vary User-Agent env=!dont-vary
  90. Header append Vary Accept-Encoding
  91.  
  92. FileETag None
  93. Header unset ETag
  94. Header unset Pragma
  95. Header unset Cache-Control
  96.  
  97. #Header unset Last-Modified
  98. # default cache 1 year = 31556926 s
  99. #Header set Cache-Control "max-age=31556926, public, no-transform, must-revalidate"
  100.  
  101. <FilesMatch "\.(htm|html|json|rss|txt|xhtml|xml)$">
  102.  
  103. # cache markup for 1 second
  104. Header set Cache-Control "max-age=1, public, no-transform, must-revalidate"
  105.  
  106. </FilesMatch>
  107.  
  108. <FilesMatch "\.(js|css)$">
  109.  
  110. # cache for 1 hour = 3600 seconds
  111. # cache for 1 day = 86400 seconds
  112. # cache for 1 week = 604800 seconds
  113. # cache for 1 month = 2629800 seconds
  114.  
  115. Header set Cache-Control "max-age=604800, public, no-transform, must-revalidate"
  116.  
  117. RequestHeader unset Cookie
  118. Header unset Set-Cookie
  119.  
  120. </FilesMatch>
  121.  
  122. <FilesMatch "\.(gif|jpe|jpeg|jpg|png|ico)$">
  123.  
  124. # cache for 1 week = 604800 seconds
  125. Header set Cache-Control "max-age=604800, public, no-transform, must-revalidate"
  126.  
  127. RequestHeader unset Cookie
  128. Header unset Set-Cookie
  129.  
  130. </FilesMatch>
  131.  
  132. <FilesMatch "\.(doc|eot|flv|mp4|ogg|pdf|svg|swf|ttf|woff)$">
  133.  
  134. # cache fonts and media files for 1 month = 2629744 seconds
  135. Header set Cache-Control "max-age=2629744, public, no-transform, must-revalidate"
  136.  
  137. RequestHeader unset Cookie
  138. Header unset Set-Cookie
  139.  
  140. </FilesMatch>
  141.  
  142.  
  143. #Header set X-XSS-Protection "1; mode=block"
  144. #Header always append X-Frame-Options SAMEORIGIN
  145. #Header set X-Content-Type-Options nosniff
  146.  
  147. EnableMMAP On
  148. KeepAlive On
  149. Timeout 100
  150. MaxKeepAliveRequests 100
  151. KeepAliveTimeout 15
  152.  
  153. <IfModule mpm_prefork_module>
  154.  
  155. StartServers 20
  156. MinSpareServers 20
  157. MaxSpareServers 40
  158. ServerLimit 150
  159. # MaxClients 256
  160. MaxRequestsPerChild 10000
  161.  
  162. </IfModule>
  163.  
  164. <IfModule mpm_worker_module>
  165. StartServers 10
  166. MinSpareThreads 20
  167. MaxSpareThreads 40
  168. ThreadLimit 64
  169. ThreadsPerChild 25
  170. MaxClients 150
  171. MaxRequestsPerChild 10000
  172. MaxClients 150
  173. </IfModule>
  174.  
  175.  
  176. # event MPM
  177. # StartServers: initial number of server processes to start
  178. # MinSpareThreads: minimum number of worker threads which are kept spare
  179. # MaxSpareThreads: maximum number of worker threads which are kept spare
  180. # ThreadsPerChild: constant number of worker threads in each server process
  181. # MaxRequestWorkers: maximum number of worker threads
  182. # MaxConnectionsPerChild: maximum number of requests a server process serves
  183. <IfModule mpm_event_module>
  184. StartServers 2
  185. MinSpareThreads 15
  186. MaxSpareThreads 50
  187. ThreadLimit 64
  188. ThreadsPerChild 25
  189.  
  190. #ServerLimit x ThreadsPerChild
  191. MaxRequestWorkers 30
  192. MaxConnectionsPerChild 3000
  193. MaxClients 150
  194. </IfModule>
  195.  
  196. #Temas SSL
  197. SSLProtocol +TLSv1.2 +TLSv1.1 +TLSv1
  198. SSLCompression off
  199. SSLHonorCipherOrder on
  200. SSLCipherSuite "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA"
  201. SSLStrictSNIVHostCheck on
  202. SSLSessionTickets off
  203. SSLUseStapling on
  204. SSLStaplingCache "shmcb:logs/stapling-cache(150000)"
  205. Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
  206. Header always set X-Content-Type-Options nosniff
Advertisement
Add Comment
Please, Sign In to add comment