Hi All,
i'm trying to enable mod_deflate on my vhost and when i run a test web page I see that it is not compressed ...
Could to someone help to solve this problem please ?
Apache 2.2.3-53
CentOS 5.7
Plesk 10.2
the file /etc/httpd/conf/httpd.conf contains lines below :
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
And I modified the file located here :
/var/www/vhosts/mydomain.com/conf/13058295130.00376000_httpd.include
and added lines below :
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE application/x-httpd-eruby
# Activation du filtre de compression
SetOutputFilter DEFLATE
# Netscape 4.x a quelques soucis, on ne compresse que le html
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Les versions de Netscape 4.06-4.08 ont quelques soucis
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# Comme d'habitude, internet explorer pose probleme
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Ne pas compresser ce type de fichiers
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?
df|avi|mov|mp3|mp4|rm)$ no-gzip dont-vary
# Proxies
Header append Vary User-Agent env=!dont-vary
# enable resulting html compression
#php_flag zlib.output_compression on
Thanks
i'm trying to enable mod_deflate on my vhost and when i run a test web page I see that it is not compressed ...
Could to someone help to solve this problem please ?
Apache 2.2.3-53
CentOS 5.7
Plesk 10.2
the file /etc/httpd/conf/httpd.conf contains lines below :
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
And I modified the file located here :
/var/www/vhosts/mydomain.com/conf/13058295130.00376000_httpd.include
and added lines below :
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE application/x-httpd-eruby
# Activation du filtre de compression
SetOutputFilter DEFLATE
# Netscape 4.x a quelques soucis, on ne compresse que le html
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Les versions de Netscape 4.06-4.08 ont quelques soucis
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# Comme d'habitude, internet explorer pose probleme
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Ne pas compresser ce type de fichiers
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?
# Proxies
Header append Vary User-Agent env=!dont-vary
# enable resulting html compression
#php_flag zlib.output_compression on
Thanks