Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add `gzip_static on` to serve preprocessed gzipped files from Cache Enabler #207

Closed
samkatakouzinos opened this issue Nov 22, 2019 · 1 comment

Comments

@samkatakouzinos
Copy link

@samkatakouzinos samkatakouzinos commented Nov 22, 2019

Please consider adding gzip_static on; to nginx config files.

This will allow Cache Enabler to serve preproccessed gzipped cache files when its following option is enabled; "Pre-compression of cached pages. Needs to be disabled if the decoding fails in the web browser."

I have tested this directive with a WordOps Wordpress Cache Enable site and works well.
Without gzip_static on the preprocessed versioned file is never delivered.

System Information

This issue tracker is only for issues directly related to WordOps.
Please use https://community.wordops.net for support questions.

If you feel the issue is a WordOps specific issue, please attach the output of the following commands.

  • lsb_release -a
    No LSB modules are available.
    Distributor ID: Debian
    Description: Debian GNU/Linux 10 (buster)
    Release: 10
    Codename: buster

  • wo info
    NGINX (1.16.1 ):

user www-data
worker_processes auto
worker_connections 50000
keepalive_timeout 8
fastcgi_read_timeout 300
client_max_body_size 100m
allow 127.0.0.1 ::1

PHP (7.2.24-1):

user
expose_php Off
memory_limit 128M
post_max_size 100M
upload_max_filesize 100M
max_execution_time 300

Information about www.conf
ping.path /ping
pm.status_path /status
process_manager ondemand
pm.max_requests 1500
pm.max_children 50
pm.start_servers 10
pm.min_spare_servers 5
pm.max_spare_servers 15
request_terminate_timeout 300
xdebug.profiler_enable_trigger off
listen php72-fpm.sock

Information about debug.conf
ping.path /ping
pm.status_path /status
process_manager ondemand
pm.max_requests 1500
pm.max_children 50
pm.start_servers 10
pm.min_spare_servers 5
pm.max_spare_servers 15
request_terminate_timeout 300
xdebug.profiler_enable_trigger on
listen 127.0.0.1:9172

PHP (7.3.11-1):

user
expose_php Off
memory_limit 128M
post_max_size 100M
upload_max_filesize 100M
max_execution_time 300

Information about www.conf
ping.path /ping
pm.status_path /status
process_manager ondemand
pm.max_requests 1500
pm.max_children 50
pm.start_servers 10
pm.min_spare_servers 5
pm.max_spare_servers 15
request_terminate_timeout 300
xdebug.profiler_enable_trigger off
listen php73-fpm.sock

Information about debug.conf
ping.path /ping
pm.status_path /status
process_manager ondemand
pm.max_requests 1500
pm.max_children 50
pm.start_servers 10
pm.min_spare_servers 5
pm.max_spare_servers 15
request_terminate_timeout 300
xdebug.profiler_enable_trigger on
listen 127.0.0.1:9173
Warning: skipping '!include /etc/mysql/mariadb.cnf' directive as maximum includerecursion level was reached in file /etc/mysql/mariadb.cnf at line 204
Warning: skipping '!includedir /etc/mysql/conf.d/' directive as maximum includerecursion level was reached in file /etc/mysql/mariadb.cnf at line 205
Warning: skipping '!include /etc/mysql/mariadb.cnf' directive as maximum includerecursion level was reached in file /etc/mysql/mariadb.cnf at line 204
Warning: skipping '!includedir /etc/mysql/conf.d/' directive as maximum includerecursion level was reached in file /etc/mysql/mariadb.cnf at line 205
Warning: skipping '!include /etc/mysql/mariadb.cnf' directive as maximum includerecursion level was reached in file /etc/mysql/mariadb.cnf at line 204
Warning: skipping '!includedir /etc/mysql/conf.d/' directive as maximum includerecursion level was reached in file /etc/mysql/mariadb.cnf at line 205
Warning: skipping '!include /etc/mysql/mariadb.cnf' directive as maximum includerecursion level was reached in file /etc/mysql/mariadb.cnf at line 204
Warning: skipping '!includedir /etc/mysql/conf.d/' directive as maximum includerecursion level was reached in file /etc/mysql/mariadb.cnf at line 205
Warning: skipping '!include /etc/mysql/mariadb.cnf' directive as maximum includerecursion level was reached in file /etc/mysql/mariadb.cnf at line 204
Warning: skipping '!includedir /etc/mysql/conf.d/' directive as maximum includerecursion level was reached in file /etc/mysql/mariadb.cnf at line 205
Warning: skipping '!include /etc/mysql/mariadb.cnf' directive as maximum includerecursion level was reached in file /etc/mysql/mariadb.cnf at line 204
Warning: skipping '!includedir /etc/mysql/conf.d/' directive as maximum includerecursion level was reached in file /etc/mysql/mariadb.cnf at line 205
Warning: skipping '!include /etc/mysql/mariadb.cnf' directive as maximum includerecursion level was reached in file /etc/mysql/mariadb.cnf at line 204
Warning: skipping '!includedir /etc/mysql/conf.d/' directive as maximum includerecursion level was reached in file /etc/mysql/mariadb.cnf at line 205

MySQL (10.3.20-MariaDB) on localhost:

port 3306
wait_timeout 60
interactive_timeout 28800
max_used_connections 3
datadir /var/lib/mysql/
socket /var/run/mysqld/mysqld.sock
my.cnf [PATH] /etc/mysql/conf.d/my.cnf

  • nginx -V
    nginx version: nginx/1.16.1 (WordOps Nginx-wo)
    built with OpenSSL 1.1.1d 10 Sep 2019
    TLS SNI support enabled
    configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-z,relro -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --build='WordOps Nginx-wo' --with-debug --with-pcre-jit --with-file-aio --with-threads --with-http_ssl_module --with-http_v2_module --with-http_stub_status_module --with-http_realip_module --with-http_v2_hpack_enc --with-http_auth_request_module --with-openssl-opt='enable-ec_nistp_64_gcc_128 enable-tls1_3 no-ssl3-method' --with-http_addition_module --with-http_geoip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_sub_module --without-http_memcached_module --add-module=/usr/src/packages/BUILD/debian/modules/headers-more-nginx-module --add-module=/usr/src/packages/BUILD/debian/modules/nginx-auth-pam --add-module=/usr/src/packages/BUILD/debian/modules/nginx-cache-purge --add-module=/usr/src/packages/BUILD/debian/modules/nginx-echo --add-module=/usr/src/packages/BUILD/debian/modules/nginx-upstream-fair --add-module=/usr/src/packages/BUILD/debian/modules/ngx_http_substitutions_filter_module --add-module=/usr/src/packages/BUILD/debian/modules/memc-nginx-module --add-module=/usr/src/packages/BUILD/debian/modules/srcache-nginx-module --add-module=/usr/src/packages/BUILD/debian/modules/HttpRedisModule --add-module=/usr/src/packages/BUILD/debian/modules/redis2-nginx-module --add-module=/usr/src/packages/BUILD/debian/modules/ngx_devel_kit --add-module=/usr/src/packages/BUILD/debian/modules/set-misc-nginx-module --add-module=/usr/src/packages/BUILD/debian/modules/nginx-module-vts --add-module=/usr/src/packages/BUILD/debian/modules/ngx_brotli

  • wo -v
    WordOps v3.10.3
    Copyright (c) 2019 WordOps.

  • wp cli info --allow-root
    OS: Linux 4.19.0 #1 SMP Wed May 15 09:45:34 MSK 2019 x86_64
    Shell: /bin/bash
    PHP binary: /usr/bin/php7.3
    PHP version: 7.3.11-1+020191026.48+debian101.gbpf71ca0
    php.ini used: /etc/php/7.3/cli/php.ini
    WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
    WP-CLI vendor dir: phar://wp-cli.phar/vendor
    WP_CLI phar path: /root
    WP-CLI packages dir:
    WP-CLI global config:
    WP-CLI project config:
    WP-CLI version: 2.3.0

  • curl -sL git.io/fjAp3 | sudo -E bash -
    Here the link to provide in your github issue : https://transfer.vtbox.net/12iIhi/wordops.txt

@VirtuBox VirtuBox added this to To do in WordOps v4.0 Nov 23, 2019
@VirtuBox VirtuBox mentioned this issue Dec 3, 2019
@VirtuBox VirtuBox moved this from To do to Done in WordOps v4.0 Dec 3, 2019
VirtuBox added a commit that referenced this issue Dec 3, 2019
- PHP 7.4 support
- Improved Webp images support with Cloudflare (Issue [#95](#95)). Nginx will not serve webp images alternative with Cloudflare IP ranges.
- Stack upgrade for adminer
- Check acme.sh installation and setup acme.sh if needed before issuing certificate
- Add `--ufw` to `wo stack status`
- Add Nginx directive `gzip_static on;` to serve precompressed assets with Cache-Enabler or WP-Rocket. (Issue [#207](#207))
- Previous `--php73` & `--php73=off` flags are replaced by `--php72`, `--php73`, `--php74` to switch site's php version
- phpMyAdmin updated to v4.9.2
- Adminer updated to v4.7.5
- Replace dot and dashes by underscores in database names (Issue [#206](#206))
- Increased database name length to 32 characters from domain name + 8 random characters
- typo error in motd-news script (Issue [#204](#204))
- Install Nginx before ngxblocker
- WordOps install/update script text color
- Issue with MySQL stack on Raspbian 9/10
- Typo error  (PR [#205](#205))
- php version in `wo debug` (PR [#209](#209))
- SSL certificates expiration display with shared wildcard certificates
@VirtuBox

This comment has been minimized.

Copy link
Member

@VirtuBox VirtuBox commented Dec 3, 2019

Issue has been fixed in the last release.

Please update WordOps with the command wo update

@VirtuBox VirtuBox closed this Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
WordOps v4.0
  
Done
2 participants
You can’t perform that action at this time.