CWP - Brotli not work and NGINX not start after upgrade of CWP Pro from v0.9.8.906 to CWP Pro v0.9.8.907 even with the last update to CWP Pro v0.9.8.913.
-
Hi, have followed all your tutorial (https://www.mysterydata.com/how-to-enable-brotli-compression-in-nginx-cwp-vestacp-and-on-linux-os/) step by step but not work.
I also followed all the suggestions in the comments but the error persists.
After upgrade CWP Pro from v0.9.8.906 to CWP Pro v0.9.8.907 NGINX not start,
the problem persists even with the last update to CWP Pro v0.9.8.913 and this is the error and the journalctl output:– Starting The nginx HTTP and reverse proxy server…
– nginx: [emerg] module “/usr/share/nginx/modules/ngx_http_brotli_filter_module.so” is not binary compatible in /etc/nginx/nginx.conf:1
– nginx: configuration file /etc/nginx/nginx.conf test failed
– nginx.service: control process exited, code=exited status=1
– Failed to start The nginx HTTP and reverse proxy server.
– Unit nginx.service entered failed state.
– nginx.service failed.I use Brotli v1.0.7 NGINX v1.16.1 on latest Centos 7 and CWP Pro release and this is the content of my ld.so.conf file:
include ld.so.conf.d/*.conf
/usr/local/lib/Please help me and thanks in advance for the support.
-
Hello
this is very strange in order to debug please send the output for this commands :yum list nginx yum info nginx nginx -V
-
Hi "sandeep" and thank for the support, you are very very kind.
[root@server ~]# yum list nginx
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile- base: ftp.antilo.de
Excluding mirror: mirror.sfo12.us.leaseweb.net - epel: d2lzkl7pfhq30w.cloudfront.net
- extras: ftp.rz.uni-frankfurt.de
- remi-safe: remi.mirror.karneval.cz
Excluding mirror: mirror.fra10.de.leaseweb.net - updates: mirror.cuegee.com
Installed Packages
nginx.x86_64 1:1.16.1-1.el7 @epel
[root@server ~]# yum info nginx
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile- base: ftp.antilo.de
Excluding mirror: mirror.sfo12.us.leaseweb.net - epel: d2lzkl7pfhq30w.cloudfront.net
- extras: ftp.rz.uni-frankfurt.de
- remi-safe: remi.mirror.karneval.cz
Excluding mirror: mirror.fra10.de.leaseweb.net - updates: ftp.hosteurope.de
Installed Packages
Name : nginx
Arch : x86_64
Epoch : 1
Version : 1.16.1
Release : 1.el7
Size : 1.6 M
Repo : installed
From repo : epel
Summary : A high performance web server and reverse proxy server
URL : http://nginx.org/
License : BSD
Description : Nginx is a web server and a reverse proxy server for HTTP, SMTP,
: POP3 and IMAP protocols, with a strong focus on high concurrency,
: performance and low memory usage.
[root@server ~]# nginx -V
nginx version: nginx/1.16.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
built with OpenSSL 1.0.2k-fips 26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-stream_ssl_preread_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-http_auth_request_module --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-google_perftools_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E'Thanks again for your help and support, you are really special !
- base: ftp.antilo.de
-
seems I've found the issue, nginx is installed from epel repo it should be installed via official nginx repository.
you need to follow this :
Install nginx from offiical nginx repo first remove the current nginx :
yum remove nginx
Second - check you've official nginx repo :
/etc/yum.repos.d/nginx.repo
if there is no nginx.repo you need to create it :
nano /etc/yum.repos.d/nginx.repo
add the following line and save it (it is recommended to change from enabled=0 to enabled=1 if you've nginx.repo already and the value is set to : enabled=0):
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1
third - install nginx from the official repo
yum --enablerepo=nginx install nginx
Now rebuild webserver from cwp :
CWP.admin >> Webserver settings >> Select webserver >> choose nginx + apache/whatever you need to choose, and hit >> Save & rebuild Configuration button
Now follow nginx brotli installation :
https://www.mysterydata.com/how-to-enable-brotli-compression-in-nginx-cwp-vestacp-and-on-linux-os/ -
Hi, thanks to your guide and your support, i managed to solve the problem related to Brotli and now Brotli works perfectly.
But doing the server rebuild, now all my WordPress sites don't work anymore because I can't remember how I set up Pretty Permalinks in the NGINX configuration.
Please, please, help me !!!
My NGINX domain.conf :
server { listen My_Website:Port; server_name My-Website www.My-Website; access_log /usr/local/apache/domlogs/My-Website.bytes bytes; access_log /usr/local/apache/domlogs/My-Website.log combined; error_log /usr/local/apache/domlogs/My-Website.error.log error; location / { location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|woff|ttf|svg|eot|sh)$ { root /home/My_User/public_html; expires max; try_files $uri @backend; } error_page 405 = @backend; error_page 500 = @custom; add_header X-Cache "HIT from Backend"; proxy_pass http://My_Website:Port; include proxy.inc; } location @backend { internal; proxy_pass http://My_Website:Port; include proxy.inc; } location @custom { internal; proxy_pass http://My_Website:Port; include proxy.inc; } location ~ .*\.(php|jsp|cgi|pl|py)?$ { proxy_pass http://My_Website:Port; include proxy.inc; } location ~ /\.ht {deny all;} location ~ /\.svn/ {deny all;} location ~ /\.git/ {deny all;} location ~ /\.hg/ {deny all;} location ~ /\.bzr/ {deny all;} disable_symlinks if_not_owner from=/home/My_User/public_html; location /.well-known/acme-challenge { default_type "text/plain"; alias /usr/local/apache/autossl_tmp/.well-known/acme-challenge; } }
Thanks in advance for the support.
-
glad to know the nginx brotli installation is now fixed
regarding the nginx template you sent here is for nginx proxy template vhost, I'm assuming Apache is the main server and you need to have .htaccess entry :
https://wordpress.org/support/article/htaccess/If you want to use nginx + php-fpm use this nginx rewrite rule :
location / { try_files $uri $uri/ /index.php?$args; location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { expires max; }
-
Hi, you are very very kind, thank you.
For CWP Pro i use Nginx & Varnish & Apache with PHP-FPM and not have the .htacces.
You can tell me precisely where I need to insert this command because I'm trying but it doesn't work:
location / {
try_files $uri $uri/ /index.php?$args;
location ~* ^.+.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
expires max;
}Thanks in advance for the support.
-
@Automata said in CWP - Brotli not work and NGINX not start after upgrade of CWP Pro from v0.9.8.906 to CWP Pro v0.9.8.907 even with the last update to CWP Pro v0.9.8.913.:
Hi, you are very very kind, thank you.
For CWP Pro i use Nginx & Varnish & Apache and not have the .htacces.
You can tell me precisely where I need to insert this command because I'm trying but it doesn't work:
location / {
try_files $uri $uri/ /index.php?$args;
location ~* ^.+.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
expires max;
}Thanks in advance for the support.
you need to add this line only in "location / { " section
try_files $uri $uri/ /index.php?$args;
***please note use this only if you're using nginx + php-fpm i.e. nginx as a main server.
-
I have added this line on "Contents of File: /etc/nginx/conf.d/vhosts/My_Website.ssl.conf file here but not work and the website page have this error: ERR_TOO_MANY_REDIRECTS.
server { listen My_Website:Port; server_name My-Website www.My-Website; access_log /usr/local/apache/domlogs/My-Website.bytes bytes; access_log /usr/local/apache/domlogs/My-Website.log combined; error_log /usr/local/apache/domlogs/My-Website.error.log error; location / { **try_files $uri $uri/ /index.php?$args;** location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|woff|ttf|svg|eot|sh)$ { root /home/My_User/public_html; expires max; try_files $uri @backend; } error_page 405 = @backend; error_page 500 = @custom; add_header X-Cache "HIT from Backend"; proxy_pass http://My_Website:Port; include proxy.inc; } location @backend { internal; proxy_pass http://My_Website:Port; include proxy.inc; } location @custom { internal; proxy_pass http://My_Website:Port; include proxy.inc; } location ~ .*\.(php|jsp|cgi|pl|py)?$ { proxy_pass http://My_Website:Port; include proxy.inc; } location ~ /\.ht {deny all;} location ~ /\.svn/ {deny all;} location ~ /\.git/ {deny all;} location ~ /\.hg/ {deny all;} location ~ /\.bzr/ {deny all;} disable_symlinks if_not_owner from=/home/My_User/public_html; location /.well-known/acme-challenge { default_type "text/plain"; alias /usr/local/apache/autossl_tmp/.well-known/acme-challenge; } }
Thanks in avance for the support.
-
Seems you're using apache use this rewrite code in .htaccess : and remove the try_files $uri $uri/ /index.php?$args; from nginx vhost
# BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress
-
feel free to open a new topic/post
-
Ok, i have opened this new topic for this new problem:
Thanks in advance for the support.