diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-07-27 14:47:45 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-07-27 14:54:08 -0400 |
commit | c27f033f4d794e28f4a6939df87ba54336127af0 (patch) | |
tree | d8f389d9db7645c9ea25ff70117f1a7d263d6c4a /nginx.sh | |
parent | 4db774c1ec0c0b20611fea938d2603e6a3dfe4ca (diff) | |
download | html5ks-c27f033f4d794e28f4a6939df87ba54336127af0.tar.xz html5ks-c27f033f4d794e28f4a6939df87ba54336127af0.zip |
use gzip_static only if nginx supports it
Diffstat (limited to 'nginx.sh')
-rwxr-xr-x | nginx.sh | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,2 +1,7 @@ #!/bin/sh -exec nginx -p `dirname $0` -c nginx.conf +cd "`dirname $0`" +touch nginx.gen.conf +if nginx -V 2>&1 | grep -q -- --with-http_gzip_static_module; then + echo "gzip_static on" >> nginx.gen.conf +fi +exec nginx -p "$PWD" -c nginx.conf |