속도/캐시 설정을 가상 호스트 파일이나 아파치 구성에 적용해야 합니까?

속도/캐시 설정을 가상 호스트 파일이나 아파치 구성에 적용해야 합니까?

일부 CMS 또는 웹사이트는 우리가 사용하는 모든 속도 설정을 좋아하지 않는 것 같아서 각 가상 호스트 파일에 다음을 입력했습니다.

# SPEED SETTINGS
# -----------------------------------------------------------------------

# Expired headers on cached items - file types below will be cached
ExpiresActive On
ExpiresByType text/html "access plus 90 seconds"
ExpiresByType text/css "access plus 2 weeks"
ExpiresByType text/javascript "access plus 2 weeks"
ExpiresByType image/png "access plus 1 month"

# Which file types to compress (deflate in Apche speak)
AddOutputFilterByType DEFLATE text/html text/css text/xml application/x-javascript application/javascript

# The downside of mod_deflate is the CPU time consumption so you may have to lower the compression level depending on your server
# UNCOMMENT and change number - 9 being the highest compression level, standard is 6
# DeflateCompressionLevel 6

# Deactivate compression for buggy browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# Tells proxies not to deliver the same content to all user agents, because some of them just can't handle it
Header append Vary User-Agent

# Saves time on every request by turning off - can effect cgi scripts so comment out if having issues
HostnameLookups Off

# Persistent connections let the browsers request multiple files with one TCP connection, thus reducing overhead for TCP handshakes and speeding up requests a lot
KeepAlive On

# The maximum number of requests per one persistent connection - bad spambots may suck up all available connections if number is too high
MaxKeepAliveRequests 100

# The timeout after which a persistent connection is dropped - if high peaks in traffic are expected, don't set too high as you might have no connections left to serve new incoming requests
KeepAliveTimeout 15

그러나 우리는 서버에 대한 Apache 구성에서 전역적으로 설정해야 한다고 들었습니다. 호스트별로 설정을 제어하는 ​​데 단점이 있습니까?

관련 정보