It looks like the zip_static_files.py script only gzips css and js files.
There's a lot more that can be compressed, such as web fonts and vector
graphics. I understand why jpg and png images are left out, but why only
css and js?
On Wednesday, August 21, 2013 11:59:18 AM UTC-7, HittingSmoke wrote:
>
> I've been going back over my configuration compared to various other
> deployment recipes after realizing I was missing some non-critical uwsgi
> related parameters. I noticed my static location block in nginx was
> different than the one recommended in the web2py nginx+uwsgi setup script.
>
> Here's what I use, which I took from the config I use on PHP vhosts, with
> only the commented out gzip line added for web2py:
>
> location ~* \.(jpg|jpeg|gif|png|svg|css|js|ico|xml|ttf|otf|woff)$ {
> access_log off;
> log_not_found off;
> expires max;
>
> #include ~/nginx/conf/web2py/gzip_static.conf;
> }
>
> Here is what's created by the stock web2py script:
>
> location ~* ^/(\w+)/static/ {
> root /home/www-data/web2py/applications/;
> #remove next comment on production
> #expires max;
> ### if you want to use pre-gzipped static files (recommended)
> ### check scripts/zip_static_files.py and remove the comments
> # include /etc/nginx/conf.d/web2py/gzip_static.conf;
> ###
> }
>
> Is there any disadvantage to my static handling over what's recommended? It
> seems mine would be advantageous as it would also serve file system uploads
> that are not saved to the static directory directly with nginx.
>
>
> Additionally, is it okay to enable static_gzip before zipping my static
> assets? If I've not yet reached production with an app will the server
> fallback to the unzipped assets in the absence of zipped files?
>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.