The pagespeed mod exists for Nginx but it not supporting in the gentoo ebuild for nginx. I have written a patch to add it to the existing ebuild that I am using on my own systems and that I feel may benefit others. Please could you review and let me know whether this will be possible.
Created attachment 349022 [details, diff]
Patch to add the use flag ngx_pagespeed to nginx to support the pagespeed module
Apply the patch against the latest nginx ebuild (nginx-1.4.1-r4.ebuild at the time of writing)
Created attachment 349024 [details, diff]
Patch against the pagespeed module to fix an conflict with syslog variable declerations in Nginx
See: https://github.com/pagespeed/ngx_pagespeed/issues/197#issuecomment-15655467 for details of the issue (where this patch was taken from).
Place in: nginx/files/nginx-1.4.1-fix-syslog-pagespeed.patch
Needs PSOL package first, see https://github.com/pagespeed/ngx_pagespeed/wiki/Building-PSOL-From-Source
... until then a no-go since it bundles arbitrary libs.
This is unfortunately a pretty big undertaking. Good luck to whoever gives it a go :)
*** Bug 477706 has been marked as a duplicate of this bug. ***
Created attachment 561910 [details, diff]
patch nginx-1.15.8-r1.ebuild to include ngx_pagespeed module
I made a patch against nginx-1.15.8-r1.ebuild and incubator-pagespeed-ngx v22.214.171.124-stable.
It compiled successfully on amd64 and x86, pagespeed version 126.96.36.199-stable and 188.8.131.52-beta.
I tested on my server (amd64/nginx-1.15.8-r1/pagespeed 184.108.40.206-stable) for several days, seems no issue.
Patch mainly copied from mva overlay's pagespeed package, and thanks the maintainer.