GZIP not being recognized by Word press
-
- Posts: 5
- Joined: Mon Jul 06, 2015 6:09 pm
GZIP not being recognized by Word press
Hello everyone,
I Google a lot before trying ot start a new thread to address a problem. Yet I'm failing to fix this issue.
I'm trying to install a Wordpress Theme but it keeps on complaining I don't have GZIP enabled even though I carried on which indicates it's up and running.
I've tried enabling it via nginix, htacess, php yet nothing is working. I'm running out of ideas :(
Kindly view my detailed stackoverflow question:
https://stackoverflow.com/questions/312 ... ot-enabled
They say other there "static server space" isn't give to us by VESTA. Is this true?
I'm on ubuntu VPS
I Google a lot before trying ot start a new thread to address a problem. Yet I'm failing to fix this issue.
I'm trying to install a Wordpress Theme but it keeps on complaining I don't have GZIP enabled even though I carried on which indicates it's up and running.
I've tried enabling it via nginix, htacess, php yet nothing is working. I'm running out of ideas :(
Kindly view my detailed stackoverflow question:
https://stackoverflow.com/questions/312 ... ot-enabled
They say other there "static server space" isn't give to us by VESTA. Is this true?
I'm on ubuntu VPS
Last edited by gzip_kompressor on Fri Jul 10, 2015 1:06 pm, edited 1 time in total.
Re: Installing Worg
Replace current the gzip_types (In nginx.conf) with this:
restart nginx and try again
Code: Select all
text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype;
-
- Posts: 5
- Joined: Mon Jul 06, 2015 6:09 pm
Re: Installing Worg
Trying it now. I did have similar config in nginx.conf but I replaced it with your regardless.skurudo wrote:Replace current the gzip_types (In nginx.conf) with this:
restart nginx and try againCode: Select all
text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype;
Just confirm, I edited the ngnix.conf in /etc/nginx/nginx.conf
I've did a fresh install of Wordpress through Installatron.
My ngnix.conf after adding your snippet.
Code: Select all
# Server globals
user nginx;
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
# Worker config
events {
worker_connections 1024;
use epoll;
}
http {
# Main settings
sendfile on;
tcp_nopush on;
tcp_nodelay on;
client_header_timeout 1m;
client_body_timeout 1m;
client_header_buffer_size 2k;
client_body_buffer_size 256k;
client_max_body_size 100m;
large_client_header_buffers 4 8k;
send_timeout 30;
keepalive_timeout 60 60;
reset_timedout_connection on;
server_tokens off;
server_name_in_redirect off;
server_names_hash_max_size 512;
server_names_hash_bucket_size 512;
# Log format
log_format main '$remote_addr - $remote_user [$time_local] $request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format bytes '$body_bytes_sent';
#access_log /var/log/nginx/access.log main;
access_log off;
# Mime settings
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Compression
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype;
# Proxy settings
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Set-Cookie;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
# Cloudflare https://www.cloudflare.com/ips
set_real_ip_from 199.27.128.0/21;
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 104.16.0.0/12;
set_real_ip_from 172.64.0.0/13;
#set_real_ip_from 2400:cb00::/32;
#set_real_ip_from 2606:4700::/32;
#set_real_ip_from 2803:f800::/32;
#set_real_ip_from 2405:b500::/32;
#set_real_ip_from 2405:8100::/32;
real_ip_header CF-Connecting-IP;
# SSL PCI Compliance
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
# Error pages
error_page 403 /error/403.html;
error_page 404 /error/404.html;
error_page 502 503 504 /error/50x.html;
# Cache
proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
proxy_cache_key "$host$request_uri $cookie_user";
proxy_temp_path /var/cache/nginx/temp;
proxy_ignore_headers Expires Cache-Control;
proxy_cache_use_stale error timeout invalid_header http_502;
proxy_cache_valid any 3d;
map $http_cookie $no_cache {
default 0;
~SESS 1;
~wordpress_logged_in 1;
}
# Wildcard include
include /etc/nginx/conf.d/*.conf;
}
-
- Posts: 5
- Joined: Mon Jul 06, 2015 6:09 pm
Re: Installing Worg
Now there is ngnix.conf in
it's code
The other here
Now in that one, I'm going to add your snippet and see if it works. I'm choosing this is because it has VESTA in it. So I'm assuming VESTA is using this ngnix.conf config to run the true nginx service. It had the stock gzip-types and now I have added the snippet to give me the following ngnix.conf
Update
Still it's saying
Code: Select all
usr/local/nginx/conf/nginx.conf
Code: Select all
pagespeed on;
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
Code: Select all
/usr/local/vesta/nginx/conf/ngnix.conf
Code: Select all
user admin;
worker_processes 1;
error_log /usr/local/vesta/log/nginx-error.log;
pid /var/run/vesta-nginx.pid;
events {
worker_connections 128;
use epoll;
}
http {
# Main settings
sendfile on;
tcp_nopush on;
tcp_nodelay on;
client_header_timeout 1m;
client_body_timeout 1m;
client_header_buffer_size 2k;
client_body_buffer_size 256k;
client_max_body_size 100m;
large_client_header_buffers 4 8k;
send_timeout 30;
keepalive_timeout 60 60;
reset_timedout_connection on;
server_tokens off;
server_name_in_redirect off;
server_names_hash_max_size 512;
server_names_hash_bucket_size 512;
# Log format
log_format main '$remote_addr - $remote_user [$time_local] $request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format bytes '$body_bytes_sent';
access_log /dev/null main;
# SSL PCI Compliance
ssl_ciphers RC4:HIGH:!aNULL:!MD5:!kEDH;
ssl_session_cache shared:SSL:10m;
ssl_prefer_server_ciphers on;
# Mime settings
include /usr/local/vesta/nginx/conf/mime.types;
default_type application/octet-stream;
# Compression
gzip on;
gzip_comp_level 9;
gzip_min_length 512;
gzip_buffers 8 64k;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype;
gzip_proxied any;
# Proxy settings
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Set-Cookie;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
# Error pages
error_page 403 /error/403.html;
error_page 404 /error/404.html;
error_page 502 503 504 /error/50x.html;
# Vhost
server {
listen 8083;
server_name _;
root /usr/local/vesta/web;
charset utf-8;
ssl on;
ssl_certificate /usr/local/vesta/ssl/certificate.crt;
ssl_certificate_key /usr/local/vesta/ssl/certificate.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
error_page 404 /error/404/index.html;
error_page 403 /error/index.html;
error_page 500 /error/index.html;
location / {
expires max;
index index.php;
}
location /error/ {
expires max;
index index.html;
}
location /rrd/ {
expires off;
internal;
}
location /backup/ {
root /;
internal;
}
location ~ \.php$ {
include /usr/local/vesta/nginx/conf/fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/local/vesta/web/$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_pass unix:/var/run/vesta-php.sock;
fastcgi_intercept_errors on;
break;
}
}
}
Still it's saying
Your server doesn't support file compression (GZIP)
Re: Installing Worg
Mmm... If your server has mod_deflate enabled, add this to the top of either your root .htaccess file or your WordPress .htaccess file:
To enable mod_deflate from console:
and restart apache2
Code: Select all
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
Code: Select all
a2enmod deflate
-
- Posts: 5
- Joined: Mon Jul 06, 2015 6:09 pm
Re: Installing Worg
So I went toskurudo wrote:Mmm... If your server has mod_deflate enabled, add this to the top of either your root .htaccess file or your WordPress .htaccess file:
To enable mod_deflate from console:Code: Select all
<IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html </IfModule>
and restart apache2Code: Select all
a2enmod deflate
Code: Select all
ftp://[USERNAME_A]@[IP_ADDRESS]/public_html/wp-includes/.htaccess
Now did SSH
Code: Select all
ssh root@[IP_ADDRESS]
Code: Select all
~# a2enmod deflate
Considering dependency filter for deflate:
Module filter already enabled
Module deflate already enabled
Code: Select all
Restarted Apache2
~# sudo service apache2 restart
* Restarting web server apache2 [ OK ]
Still it's saying Gzip installation not detected.
Do you think there could be problem with the different number of usernames? like the wordpress directory is under username_a and not under say root? Does it effect anything?
-
- Posts: 5
- Joined: Mon Jul 06, 2015 6:09 pm
Re: GZIP not being recognized by Word press
/close thread
I've abandon this.
I've abandon this.
Re: GZIP not being recognized by Word press
Ok, as you wish.