I have created Angular App for which I am facing performance issues as my main.js file size is 3.76 MB. So I looked for enabling gzip compression on server. It worked for Apache in windows but not for Solaris 11.
So is there a different way to enable compression on Solaris 11 for Apache-2.4.
On Windows I enabled compression for Apache Server by uncommenting following module line inside httpd.conf of Apache and file size reduced to 680KB
LoadModule deflate_module modules/mod_deflate.so
And adding following at the end of httpd.conf file
<IfModule mod_deflate.c>
<FilesMatch "\.(html|txt|css|js|php|pl)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
For Solaris I tried same but it's not working. JS files transferred size and resource size is still same.
Also tried to put .htaccess file in root of my app with following lines
<Directory /var/apache2/2.4/htdocs/>
<IfModule mod_mime.c>
AddType application/x-javascript .js
AddType text/css .css
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/plain text/xml application/javascript
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
</IfModule>
</IfModule>
Header append Vary User-Agent env=!dont-vary
</Directory>
Anyone has any ideas about how to get it worked for Solaris 11 for Apache 2.4
Thanks in Advance.