0

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.

Rohit
  • 179
  • 3
  • 12
  • What is the result of `ldd /path/to/mod_deflate.so`? – Romeo Ninov Nov 28 '19 at 07:55
  • @RomeoNinov : Hi, actually don't know about Solaris and it's commands. Server is sitting at client side. I am supporting them from remote. So if you can help me where to hit this command then I can tell you the result. I don't know the path to mod_deflate.so file – Rohit Nov 28 '19 at 09:25
  • `find . -type f -name mod_deflate.so` and you will find the full path to mod_deflate.so – Romeo Ninov Nov 28 '19 at 09:26
  • @RomeoNinov: I asked client for path. They have given below path "/usr/apache2/2.4/libexec/mod_deflate.so" – Rohit Nov 28 '19 at 09:56
  • So provide the result of `ldd /usr/apache2/2.4/libexec/mod_deflate.so` – Romeo Ninov Nov 28 '19 at 09:57
  • Hi Romeo, Below is result of command you said. `libz.so.1 => /lib/64/libz.so.1` and `libc.so.1 => /lib/64/libc.so.1` – Rohit Nov 28 '19 at 10:06

0 Answers0