Faster page loads with mod_deflate and mod_expires
Page: 1
Terry Johnson
on Jan 2. 2008. 3:50 pm
I'm using aC over a VPN quite a lot, and therefore wanted to make it go like a rocket. The following additions to the Apache2 config seem to do the trick:
Note that js.php serves its content as text/js, so it doesn't get caught by those expiry rules.
SetOutputFilter DEFLATE SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary SetEnvIfNoCase Request_URI attachments no-gzip dont-vary ExpiresActive On ExpiresByType image/gif A21600 ExpiresByType image/jpeg A21600 ExpiresByType text/css A21600 ExpiresByType application/x-javascript A21600
Note that js.php serves its content as text/js, so it doesn't get caught by those expiry rules.
Terry Johnson
VP Technology, Scribendi Inc.
http://www.scribendi.com - Editing, Proofreading and more...
VP Technology, Scribendi Inc.
http://www.scribendi.com - Editing, Proofreading and more...
Terry Johnson
on Jan 4. 2008. 6:27 pm
This really helps with the icons and TinyMCE, and it eliminates loads of "if-modified-since" HTTP requests, so page rendering finishes much faster.
I can also report that thus far it didn't break anything, which is nice.
I can also report that thus far it didn't break anything, which is nice.
Terry Johnson
VP Technology, Scribendi Inc.
http://www.scribendi.com - Editing, Proofreading and more...
VP Technology, Scribendi Inc.
http://www.scribendi.com - Editing, Proofreading and more...
I'd like to try this but what file are you actually modifying when you say apache2 config? httpd.conf?
Thanks,
Eric
Thanks,
Eric
Terry Johnson
on Apr 8. 2008. 3:25 am
The simplest method is to use a .htaccess file, but you could also put these directives in a Directory block of httpd.conf or the virtual host .conf file for your aC installation, depending on your preferences and setup.
Be sure to check that you have mod_expires installed and enabled, and to restart Apache to re-read the .conf files if you chose to modify them.
Be sure to check that you have mod_expires installed and enabled, and to restart Apache to re-read the .conf files if you chose to modify them.
Terry Johnson
VP Technology, Scribendi Inc.
http://www.scribendi.com - Editing, Proofreading and more...
VP Technology, Scribendi Inc.
http://www.scribendi.com - Editing, Proofreading and more...
Sorry, but would you mind posting a more explicit how-to? I'm not that experienced with modding apache. Specifically, where is the "Directory Block" in httpd.conf (what am I looking for)?
Thanks again,
Eric
Thanks again,
Eric
Terry Johnson
on Apr 10. 2008. 1:28 pm
Hi Eric -
The best places to dive into the subject of apache configuration are probably their manual pages on .htaccess files and configuration sections:
http://httpd.apache.org/docs/2.0/howto/htaccess.html
http://httpd.apache.org/docs/2.0/sections.html
The best places to dive into the subject of apache configuration are probably their manual pages on .htaccess files and configuration sections:
http://httpd.apache.org/docs/2.0/howto/htaccess.html
http://httpd.apache.org/docs/2.0/sections.html
Terry Johnson
VP Technology, Scribendi Inc.
http://www.scribendi.com - Editing, Proofreading and more...
VP Technology, Scribendi Inc.
http://www.scribendi.com - Editing, Proofreading and more...
digitalvomiting
on Apr 16. 2008. 2:50 pm
Got the same options running with Beta 1.1 , cuts on the loading time indeed, alhough I think that it can go faster ...
Ilija, are there any debug options to turn off inside of the beta version (except that one in config/config.php) ?
Ilija, are there any debug options to turn off inside of the beta version (except that one in config/config.php) ?



