Trying to install pagespeed module with nginx

Posted August 23, 2017 6k views

These last couple of days I have been banging my head against my keyboard trying to install ngx_pagespeed with nginx.

First couple of times I was trying to install ngxpagespeed as a dynamic module so maybe I could install it along side an existing nginx (Version: 1.13.4). I am not sure if it’s possible but I have read some forums stating it is. In the forum it said to use this (–dynamic-module) at the end of the automated install instead of (–nginx-version latest) and you should get and then I can put that in the modules folder of nginx and it should work. I have no idea where to find this file after running the automated install.

After some frustration I ran up a test environment to see if I can get the normal install to work, so that would install both nginx and pagespeed. Both times I ran it it gave this error at the end after it saying “Build nginx?”

  /root/ngx_pagespeed-latest-stable/src/ In function ‘ngx_int_t net_instaweb::{anonymous}::ps_preaccess_handler(ngx_http_request_t*)’:
/root/ngx_pagespeed-latest-stable/src/ error: ‘ngx_http_core_try_files_phase’ was not declared in this scope
   while (ph[i + 1].checker != ngx_http_core_try_files_phase &&
objs/Makefile:1323: recipe for target 'objs/addon/src/ngx_pagespeed.o' failed
make[1]: *** [objs/addon/src/ngx_pagespeed.o] Error 1
make[1]: Leaving directory '/root/nginx-1.13.4'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2
Error: Failure running 'make', exiting.

Could this error be coming up because I have nginx already installed?

I am still pretty new to VPS, Ubuntu, nginx etc but I am learning fast. So any help would be greatly appreciated!

Ubuntu version: 16.04
Nginx version: 1.13.4

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer
  • Just tried that but I started getting stuck when it said use command “make clean” it gave me a error back saying: “make: *** No rule to make target ‘clean’. Stop.”

    Then it said use the ./configure command with the extensions and after running the command it said some of the extensions were not found or command not found.

    Then I tried running “make” and “make install” but both of them came back saying: “make: *** No targets specified and no makefile found. Stop.” and “make: *** No rule to make target 'install’. Stop.”