Nginx with ngx_pagespeed and Naxsi

maorbari

Verified User
Joined
Nov 8, 2013
Messages
21
Hi,

I have nginx reverse proxy to apache with mod_php php 5.6.

1. After I installed ngx_pagespeed and add those lines on nginx.conf, page are load slower and I dont see any cache on the directories I set.
Code:
pagespeed on;
pagespeed FileCachePath /var/ngx_pagespeed_cache;

How to solve it?

2. I installed Naxsi for sql injection and xss protection.
I followed the tutorial http://rrntechnologies.blogspot.co.il/2013/08/nginx-anti-xss-sql-injection-naxsi-open.html
but how I use it with custombuild in right way? The code they are telling me to put on "/etc/nginx/sites-enabled/default" is not good for me.

How to solve it?

Thank you a lot!
 
Hi,

Thanks for answer.
I already compile nginx with them.
How to solve both problems?
Thanks.
 
Make sure
/var/ngx_pagespeed_cache;
is owned by the nginx user by using:
chown nginx:nginx /var/ngx_pagespeed_cache;

For the second question just add the code to each vhost configuration and add the code to new vhost template.
 
Make sure
/var/ngx_pagespeed_cache;
is owned by the nginx user by using:
chown nginx:nginx /var/ngx_pagespeed_cache;

For the second question just add the code to each vhost configuration and add the code to new vhost template.

The Pagespeed works good!
Can cache it on APC instead of files?

and naxsi - it exactly what I did. I try a lot of things. nothing works.
What to do?

Thanks!
 
Back
Top