• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Recompiling Nginx with Pagespeed (ngx_pagespeed)

Dukemaster

Regular Pleskian
Hi at all,
since I discovered two irregularities with the displayed version of Pagespeed I'm fighting with myself about recompiling Nginx 1.13.5 again with modules ngx_pagespeed, brotli, etc, shortly speaking the whole tutorial of @UFHH01.
The problem could be caused by my own mistake compiling new nginx 1.13.5 version with pagespeed 1.12.34.3-0 without removing the old nginx 1.13.2 compiled with pagespeed 1.12.34.2-0 from around two months ago.

1. Now Qualys (ssllabs.com) displays the (correct) new pagespeed version 1.12.34.3-0 and also new nginx 1.13.5 version. Everything seems to be perfect.
2.
But in e.g. nginx logs (/var/log/nginx/error.log) the old pagespeed version 1.12.34.2-0 is shown:
Code:
2017/10/16 17:57:05 [error] 2162#2162: *4306 invalid url, client: 91.200.12.81, server: , request: "GET / HTTP/1.0"
2017/10/16 18:42:13 [error] 2162#2162: *5480 invalid url, client: 91.200.12.81, server: , request: "GET / HTTP/1.0"
2017/10/16 19:28:43 [error] 2162#2494: [ngx_pagespeed 1.12.34.2-0] Slow ReadFile operation on file /var/ngx_pagespeed_cache/v3/example.com/https,3A/,2Fwww.example.com/photos/userImages/12/3011-12b2b0a4.jpg,: 52.461ms; configure SlowFileLatencyUs to change threshold

or for example here in /var/www/vhosts/example.com/logs/access_ssl_log.processed:
Code:
217.160.167.167 - - [17/Sep/2017:04:30:00 +0200] "GET /images/apple-touch-icon-32x32.png HTTP/1.1" 200 29390 "http://www.example.com/" "Serf/1.3.8 (mod_pagespeed/1.12.34.2-0)"
217.160.167.167 - - [17/Sep/2017:04:30:00 +0200] "GET /photos/userImages/0c/3079-0c145f07-medium.jpg HTTP/1.1" 200 44227 "http://www.example.com/" "Serf/1.3.8 (mod_pagespeed/1.12.34.2-0)"
217.160.167.167 - - [17/Sep/2017:04:30:00 +0200] "GET /images/colorPickerGradient.png HTTP/1.1" 200 8566 "http://www.example.com/" "Serf/1.3.8 (mod_pagespeed/1.12.34.2-0)"
217.160.167.167 - - [17/Sep/2017:04:30:00 +0200] "GET /images/colorPickerBar.png HTTP/1.1" 200 102 "http://www.example.com/" "Serf/1.3.8 (mod_pagespeed/1.12.34.2-0)"
217.160.167.167 - - [17/Sep/2017:04:30:56 +0200] "GET /images/smilies/emojione/1f914.png HTTP/1.1" 200 604 "http://www.example.com/" "Serf/1.3.8 (mod_pagespeed/1.12.34.2-0)"

It could be possible that the wrong displayed version could be a issue by pagespeed, but I couldn't find hints to this possibility. Don't know if other ngx_pagespeed users have the same diplayyed version problem, but I don't think so.
APART FROM THAT PAGESPEED WORKS VERY FINE (old and new version) ! ! !

Would be very nice and helpful if someone could help me to go the right way by removing pagespeed, if necessary also removing nginx. HOW to REMOVE it correctly.
Then for sure I want to compile nginx 1.13.5 again with ngx_pagespeed and the other modules. Pagespeed is amazing, don't want to give up using it..! ! ! Like PLESK <3
Perhaps there is no need to remove both and I only have to recompile it like it is by UFHH01's contribution.


Greets
 
Last edited:
Hi Dukemaster,

to CLEAN up your previous installation, you should be aware about your installation paths... so let's have another look at my => Contribution - How to compile NGINX with additional modules ( pagespeed / cache_purge / headers-more / and others )

6. Prepare your NGINX - compilation by using standard linux - folders and RSYNC them with your previous extractions:
Code:
cd /root/addons/nginx/nginx-1.13.5

mkdir -p /usr/share/nginx/modules/ngx_cache_purge-2.3
rsync -r /root/addons/nginx/nginx-1.13.5/ngx_cache_purge-2.3/* /usr/share/nginx/modules/ngx_cache_purge-2.3
mkdir -p /usr/share/nginx/modules/ngx_coolkit-0.2
rsync -r /root/addons/nginx/nginx-1.13.5/ngx_coolkit-0.2/* /usr/share/nginx/modules/ngx_coolkit-0.2
mkdir -p /usr/share/nginx/modules/ngx_slowfs_cache-1.10
rsync -r /root/addons/nginx/nginx-1.13.5/ngx_slowfs_cache-1.10/* /usr/share/nginx/modules/ngx_slowfs_cache-1.10
mkdir -p /usr/share/nginx/modules/ngx_headers-more-0.32
rsync -r /root/addons/nginx/nginx-1.13.5/ngx_headers-more-0.32/* /usr/share/nginx/modules/ngx_headers-more-0.32
mkdir -p /usr/share/nginx/modules/ngx_pagespeed-1.12.34.3-stable
rsync -r /root/addons/nginx/nginx-1.13.5/ngx_pagespeed-1.12.34.3-stable/* /usr/share/nginx/modules/ngx_pagespeed-1.12.34.3-stable

As you can see, the modules and the whole folders are copied to => /usr/share/nginx/modules , while your VERY OWN configuration for "pagespeed" ( pls. see your very own post: => #49 ) defines your used cache - folder(s).

Pls. consider to REMOVE the content of the above mentioned folders and start over with the compiling tutorial.

A good hint to check folders and files on your server is to use "locate" - command ( the "mlocate" - package should be installed by now, as I suggested it a few times now to you! ):
Code:
updatedb

locate pagespeed
You are now able to see all existent folders/files for the used search term and are able to delete leftover folders/files, which you might have forgotten with your previous clean up. ;)
 
I have mlocate since months, since you suggested it for the first time, the same day I installed it. And I also do updatedb every two or three days or when I do some changes. ;)

I also removed nginx 1.13.5 in /root/addons/nginx. Wouldn't be necessary but to be sure.
Only these are left over by locate:
Code:
root@server:~# updatedb
root@server:~# locate pagespeed
/opt/psa/var/health/data/localhost/df-var-cache-pagespeed
/opt/psa/var/health/data/localhost/df-var-ngx_pagespeed_cache
/opt/psa/var/health/data/localhost/df-var-cache-pagespeed/df_complex-free.rrd
/opt/psa/var/health/data/localhost/df-var-cache-pagespeed/df_complex-reserved.rrd
/opt/psa/var/health/data/localhost/df-var-cache-pagespeed/df_complex-used.rrd
/opt/psa/var/health/data/localhost/df-var-cache-pagespeed/percent_bytes-free.rrd
/opt/psa/var/health/data/localhost/df-var-cache-pagespeed/percent_bytes-reserved.rrd
/opt/psa/var/health/data/localhost/df-var-cache-pagespeed/percent_bytes-used.rrd
/opt/psa/var/health/data/localhost/df-var-ngx_pagespeed_cache/df_complex-free.rrd
/opt/psa/var/health/data/localhost/df-var-ngx_pagespeed_cache/df_complex-reserved.rrd
/opt/psa/var/health/data/localhost/df-var-ngx_pagespeed_cache/df_complex-used.rrd
/opt/psa/var/health/data/localhost/df-var-ngx_pagespeed_cache/percent_bytes-free.rrd
/opt/psa/var/health/data/localhost/df-var-ngx_pagespeed_cache/percent_bytes-reserved.rrd
/opt/psa/var/health/data/localhost/df-var-ngx_pagespeed_cache/percent_bytes-used.rrd
 
Last edited:
El stupido Dukemaster. o_O
The output of ngx_pagespeed-1.12.34.2-0 never refered to the ngx_pagespeed version. It seems to refer to the google part in /psol/
Code:
wget https://dl.google.com/dl/page-speed/psol/1.12.34.2-x64.tar.gz
As I tried to find also a newer psol version (perhaps 1.12.34.3) which isn't possible, because ngx_pagespeed-1.12.34.3-0 already uses ../psol/1.12.34.2,
it made "click" in my burning stale brain.
So I did the new recompilation for nothing.
Okay, perhaps possible errors in the first compilation of nginx 1.13.5 would be eliminated, if there were some...I don't think so.
Pagespeed is running wild and fine, increases performance of my websites, blogs, forums, image galleries, as expected and told by mastermind @UFHH01.
THANKS, UWE, for your amazing help and competence. You are incredible. I learned a lot of things by recompilation.
Perhaps I will put /var/ngx_pagespeed again in tmpfs, this pushes a lil more, like I did until 10 days before for period of three weeks.
Same output like before:
Code:
root@server:~# nginx -V
nginx version: nginx/1.13.5
built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5)
built with OpenSSL 1.1.1-dev  xx XXX xxxx
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --lock-path=/var/lock/nginx.lock --pid-path=/var/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 --user=nginx --group=nginx --with-debug --with-file-aio --with-google_perftools_module --with-mail --with-mail_ssl_module --with-threads --with-select_module --with-stream --with-stream_ssl_module --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_mp4_module --with-http_perl_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_stub_status_module --with-http_sub_module --with-http_ssl_module --with-http_v2_module --with-http_xslt_module --with-poll_module --with-openssl=/usr/share/openssl --with-openssl-opt=enable-tls1_3 --add-module=/usr/share/nginx/modules/ngx_brotli --add-module=/usr/share/nginx/modules/ngx_pagespeed-1.12.34.3-stable --add-module=/usr/share/passenger/ngx_http_passenger_module --add-module=/usr/share/nginx/modules/ngx_cache_purge-2.3 --add-module=/usr/share/nginx/modules/ngx_coolkit-0.2 --add-module=/usr/share/nginx/modules/ngx_slowfs_cache-1.10 --add-module=/usr/share/nginx/modules/ngx_headers-more-0.32

Would be great if you would tell me if I made something wrong. No prob to recompile or change. In less as 30 days when Ubuntu 16.04.4 will come, I will make server new, to be ready for new PLESK ONYX and without old mistakes like my openssl by source.

Great stuff nginx 1.13.5 with brotli, pagespeed, and more...

Thanks and greets :)
 
Back
Top