Re: [ngx-pagespeed-discuss] Enable nginx by query (not working?)

6 views
Skip to first unread message

Joshua Marantz

unread,
May 30, 2016, 10:25:10 AM5/30/16
to pagespeed-dev, Otto van der Schaaf
Is there a fundamental reason why we can't make NPS behave like MPS with respect to on/off/unplugged?

-Josh


On Mon, May 30, 2016 at 5:40 AM, Otto van der Schaaf <osc...@we-amp.com> wrote:
Yes with the configuration I suggested pagespeed is enabled, but should not be doing any optimizations - just passing through html. I was hoping that this would help with what you are trying to achieve. Could you describe what you are trying to achieve?

Otto

On Sun, May 29, 2016 at 7:14 PM, Миша Политаев <nisy...@gmail.com> wrote:
Hello Otto!

Just try this. PageSpeed persistent enabled. Even without any query strings.

Seems not work as expected. ​

2016-05-27 13:20 GMT+02:00 Otto van der Schaaf <osc...@we-amp.com>:
Sorry,  I made a mistake. Could you try this? Doing so configures pagespeed as enabled (and parsing html) but not doing any optimizations unless you explicitly enable them on the querystring

server {
    server_name www.real_server.com;
    pagespeed on;
    pagespeed RewriteLevel PassThrough;
    pagespeed InPlaceResourceOptimization off;
}

Otto

On Tuesday, May 24, 2016 at 11:29:57 AM UTC+2, Миша Политаев wrote:
Thank for answer! 

I tried to do as you say. 

But for my configuration this does not work:

Add this at the top of configration of my vhost config
 server {
   server_name unused;
   pagespeed on;
}

server {
    server_name www.real_server.com;
    pagespeed off;
}

And I cant see header "X-Page-Speed:" in "Response Headers" if try to do "www.real_server/?PageSpeed=on". When set "pagespeed on;" i see the Pagespeed header. By url "www.real_server/?PageSpeed=off" Pagespeed was disabled.

My version of module is 1.10.33.2-beta,
X-Page-Speed:
1.10.33.2-7600.
Version NGINX=1.8.0

Which version you used?

понедельник, 23 мая 2016 г., 12:29:22 UTC+2 пользователь Otto van der Schaaf написал:
When there is no server{} block configured where ngx_pagespeed is enabled, you will get the behavior you are seeing. I think that in the following example however, you would get the desired behavior for the server{} block named www.yoursite.com:

server {
   server_name unused;   
   pagespeed on;
}
server {
   server_name www.yoursite.com
   pagespeed off;
}

Perhaps you can create a (temporary) workaround based on adding a server block that has pagespeed enabled but is not used?

I created https://github.com/pagespeed/ngx_pagespeed/issues/1204 to track this, perhaps it should be considered a bug.

Otto


On Mon, May 23, 2016 at 9:53 AM, Миша Северный <nisy...@gmail.com> wrote:
Hello to all!

Is there a way to enable pagespeed module in nginx by query?

I saw that in apache it can be enabled or disabled by query. F.i. www.site.com/?PageSpeed=on

In this case in config apache pagespeed must be set to "off". In Apache "off" mean that module can be enable by url query.

Ok. But in Nginx "off" mean that module completely disabled and you cant enable it by query. In apache for completely disabling is third option, in nginx i know only "on" and "off". I read the docs pagespeed module and my question is still.

Its really that in Nginx it is not possible?

P.S. I can "on" module in config and disable module by query. But it is not quite that what i want.

Thank to all for answers.

--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ngx-pagespeed-discuss/c2M80KOqUV0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ngx-pagespeed-di...@googlegroups.com.

Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.

Otto van der Schaaf

unread,
May 30, 2016, 10:46:32 AM5/30/16
to Joshua Marantz, pagespeed-dev
No I do not think so. It looks like it will not be difficult to make NPS behave identical to MPS with regard to on/off/unplugged. 

Otto
Reply all
Reply to author
Forward
0 new messages