Back button not working with nginx and rewrites

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Back button not working with nginx and rewrites

Mariano Martinez Peck
Hi guys,

I have a seaside website in which I do some rewrites. If I use a swazoo server, the back button works as expected. However, when I deploy it using nginx + rewrites it doesn't work anymore. I do have a #updateUrl: in my main component and I can see the URL in the browser to be updated. I also see that the request is being processed. However, the page renders again the same page...so it does not goes back. _k does change as well in the browser URL.

My setup is with gemstone, nginx and fastcgi. (I cc'ed gemstone in case this is the problem.....)

Any help would be appreciated.

I paste the configuration I am using in case someone can help me.

The important part of nginx is this:

location ~* /clientXXX/appYYY {
rewrite ^/clientXXX/(.*)$ /$1 break;
try_files $uri @seasideclientXXX;
}


location @seasideclientXXX {
include fastcgi_params;
fastcgi_param REQUEST_URI $uri?$args; 
  fastcgi_pass seasideclientXXX;
  fastcgi_next_upstream error invalid_header timeout http_500;


My app is registered as 'appYYY' and I execute this in the image:

| application | 
application := WADispatcher default handlerAt: 'dp'.
application
preferenceAt: #serverProtocol put: 'https';  
preferenceAt: #serverHostname put: 'localhost';
preferenceAt: #serverPort put: 443;
preferenceAt: #serverPath put: '/clientXXX/appYYY'.

Thanks in advance, 

--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Back button not working with nginx and rewrites

Mariano Martinez Peck
mmmmm weird... I tried with one single gem (just in case) and with no rewrite....a nginx conf as simple as possible.... nothing strange, and still same problem. 

Any ideas what could be wrong? swazoo server works fine... is there anything known I should do to manage back button when using an external web server?

Thanks, 


On Wed, Jan 22, 2014 at 4:04 PM, Mariano Martinez Peck <[hidden email]> wrote:
Hi guys,

I have a seaside website in which I do some rewrites. If I use a swazoo server, the back button works as expected. However, when I deploy it using nginx + rewrites it doesn't work anymore. I do have a #updateUrl: in my main component and I can see the URL in the browser to be updated. I also see that the request is being processed. However, the page renders again the same page...so it does not goes back. _k does change as well in the browser URL.

My setup is with gemstone, nginx and fastcgi. (I cc'ed gemstone in case this is the problem.....)

Any help would be appreciated.

I paste the configuration I am using in case someone can help me.

The important part of nginx is this:

location ~* /clientXXX/appYYY {
rewrite ^/clientXXX/(.*)$ /$1 break;
try_files $uri @seasideclientXXX;
}


location @seasideclientXXX {
include fastcgi_params;
fastcgi_param REQUEST_URI $uri?$args; 
  fastcgi_pass seasideclientXXX;
  fastcgi_next_upstream error invalid_header timeout http_500;


My app is registered as 'appYYY' and I execute this in the image:

| application | 
application := WADispatcher default handlerAt: 'dp'.
application
preferenceAt: #serverProtocol put: 'https';  
preferenceAt: #serverHostname put: 'localhost';
preferenceAt: #serverPort put: 443;
preferenceAt: #serverPath put: '/clientXXX/appYYY'.

Thanks in advance, 

--
Mariano
http://marianopeck.wordpress.com



--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Back button not working with nginx and rewrites

Dale Henrichs-3
Mariano,

It seems that if swazoo is working fine that the nginx setup would be suspect ... 

Could you should share your simple nginx script in case there's something there? 

Dale




On Wed, Jan 22, 2014 at 4:33 PM, Mariano Martinez Peck <[hidden email]> wrote:
mmmmm weird... I tried with one single gem (just in case) and with no rewrite....a nginx conf as simple as possible.... nothing strange, and still same problem. 

Any ideas what could be wrong? swazoo server works fine... is there anything known I should do to manage back button when using an external web server?

Thanks, 


On Wed, Jan 22, 2014 at 4:04 PM, Mariano Martinez Peck <[hidden email]> wrote:
Hi guys,

I have a seaside website in which I do some rewrites. If I use a swazoo server, the back button works as expected. However, when I deploy it using nginx + rewrites it doesn't work anymore. I do have a #updateUrl: in my main component and I can see the URL in the browser to be updated. I also see that the request is being processed. However, the page renders again the same page...so it does not goes back. _k does change as well in the browser URL.

My setup is with gemstone, nginx and fastcgi. (I cc'ed gemstone in case this is the problem.....)

Any help would be appreciated.

I paste the configuration I am using in case someone can help me.

The important part of nginx is this:

location ~* /clientXXX/appYYY {
rewrite ^/clientXXX/(.*)$ /$1 break;
try_files $uri @seasideclientXXX;
}


location @seasideclientXXX {
include fastcgi_params;
fastcgi_param REQUEST_URI $uri?$args; 
  fastcgi_pass seasideclientXXX;
  fastcgi_next_upstream error invalid_header timeout http_500;


My app is registered as 'appYYY' and I execute this in the image:

| application | 
application := WADispatcher default handlerAt: 'dp'.
application
preferenceAt: #serverProtocol put: 'https';  
preferenceAt: #serverHostname put: 'localhost';
preferenceAt: #serverPort put: 443;
preferenceAt: #serverPath put: '/clientXXX/appYYY'.

Thanks in advance, 

--
Mariano
http://marianopeck.wordpress.com



--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] [Seaside] Re: Back button not working with nginx and rewrites

Mariano Martinez Peck



On Wed, Jan 22, 2014 at 10:44 PM, Dale Henrichs <[hidden email]> wrote:
Mariano,

It seems that if swazoo is working fine that the nginx setup would be suspect ... 


Yes, I think the same. But I am completely clueless of what can be...
 
Could you should share your simple nginx script in case there's something there? 


Sure, this is the conf...It cannot be simpler:


      upstream seaside 
      {
        server localhost:9001;
      }
 
      upstream research 
      {
        server localhost:9005;
      }
 
 
 
      server
      {
server_name localhost;
 
        root /var/www/glass/;
   listen       443;
   ssl                  on;
   ssl_certificate      /usr/local/conf/newcert.pem;
   ssl_certificate_key  /usr/local/conf/privkey.pem;

        location / { 
try_files $uri @seaside;

        }
     
        location @seaside {
          include fastcgi_params;
          fastcgi_pass seaside;
 
          
        }
   
      }
    


Thanks Dale, 

 
Dale




On Wed, Jan 22, 2014 at 4:33 PM, Mariano Martinez Peck <[hidden email]> wrote:
mmmmm weird... I tried with one single gem (just in case) and with no rewrite....a nginx conf as simple as possible.... nothing strange, and still same problem. 

Any ideas what could be wrong? swazoo server works fine... is there anything known I should do to manage back button when using an external web server?

Thanks, 


On Wed, Jan 22, 2014 at 4:04 PM, Mariano Martinez Peck <[hidden email]> wrote:
Hi guys,

I have a seaside website in which I do some rewrites. If I use a swazoo server, the back button works as expected. However, when I deploy it using nginx + rewrites it doesn't work anymore. I do have a #updateUrl: in my main component and I can see the URL in the browser to be updated. I also see that the request is being processed. However, the page renders again the same page...so it does not goes back. _k does change as well in the browser URL.

My setup is with gemstone, nginx and fastcgi. (I cc'ed gemstone in case this is the problem.....)

Any help would be appreciated.

I paste the configuration I am using in case someone can help me.

The important part of nginx is this:

location ~* /clientXXX/appYYY {
rewrite ^/clientXXX/(.*)$ /$1 break;
try_files $uri @seasideclientXXX;
}


location @seasideclientXXX {
include fastcgi_params;
fastcgi_param REQUEST_URI $uri?$args; 
  fastcgi_pass seasideclientXXX;
  fastcgi_next_upstream error invalid_header timeout http_500;


My app is registered as 'appYYY' and I execute this in the image:

| application | 
application := WADispatcher default handlerAt: 'dp'.
application
preferenceAt: #serverProtocol put: 'https';  
preferenceAt: #serverHostname put: 'localhost';
preferenceAt: #serverPort put: 443;
preferenceAt: #serverPath put: '/clientXXX/appYYY'.

Thanks in advance, 

--
Mariano
http://marianopeck.wordpress.com



--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] [Seaside] Re: Back button not working with nginx and rewrites

Dale Henrichs-3
I've never really done any work with nginx ... the only thing that looks suspicious to me is the `include fastcgi_params` statement ... 

I assume that you've bounced nginx and made sure that the nginx you think you are hitting is the one that you are changing? 

I know this is rudimentary, but when the impossible is happening you have to eliminate the improbable:) or something like that:)

Dale


On Wed, Jan 22, 2014 at 6:25 PM, Mariano Martinez Peck <[hidden email]> wrote:



On Wed, Jan 22, 2014 at 10:44 PM, Dale Henrichs <[hidden email]> wrote:
Mariano,

It seems that if swazoo is working fine that the nginx setup would be suspect ... 


Yes, I think the same. But I am completely clueless of what can be...
 
Could you should share your simple nginx script in case there's something there? 


Sure, this is the conf...It cannot be simpler:


      upstream seaside 
      {
        server localhost:9001;
      }
 
      upstream research 
      {
        server localhost:9005;
      }
 
 
 
      server
      {
server_name localhost;
 
        root /var/www/glass/;
   listen       443;
   ssl                  on;
   ssl_certificate      /usr/local/conf/newcert.pem;
   ssl_certificate_key  /usr/local/conf/privkey.pem;

        location / { 
try_files $uri @seaside;

        }
     
        location @seaside {
          include fastcgi_params;
          fastcgi_pass seaside;
 
          
        }
   
      }
    


Thanks Dale, 

 
Dale




On Wed, Jan 22, 2014 at 4:33 PM, Mariano Martinez Peck <[hidden email]> wrote:
mmmmm weird... I tried with one single gem (just in case) and with no rewrite....a nginx conf as simple as possible.... nothing strange, and still same problem. 

Any ideas what could be wrong? swazoo server works fine... is there anything known I should do to manage back button when using an external web server?

Thanks, 


On Wed, Jan 22, 2014 at 4:04 PM, Mariano Martinez Peck <[hidden email]> wrote:
Hi guys,

I have a seaside website in which I do some rewrites. If I use a swazoo server, the back button works as expected. However, when I deploy it using nginx + rewrites it doesn't work anymore. I do have a #updateUrl: in my main component and I can see the URL in the browser to be updated. I also see that the request is being processed. However, the page renders again the same page...so it does not goes back. _k does change as well in the browser URL.

My setup is with gemstone, nginx and fastcgi. (I cc'ed gemstone in case this is the problem.....)

Any help would be appreciated.

I paste the configuration I am using in case someone can help me.

The important part of nginx is this:

location ~* /clientXXX/appYYY {
rewrite ^/clientXXX/(.*)$ /$1 break;
try_files $uri @seasideclientXXX;
}


location @seasideclientXXX {
include fastcgi_params;
fastcgi_param REQUEST_URI $uri?$args; 
  fastcgi_pass seasideclientXXX;
  fastcgi_next_upstream error invalid_header timeout http_500;


My app is registered as 'appYYY' and I execute this in the image:

| application | 
application := WADispatcher default handlerAt: 'dp'.
application
preferenceAt: #serverProtocol put: 'https';  
preferenceAt: #serverHostname put: 'localhost';
preferenceAt: #serverPort put: 443;
preferenceAt: #serverPath put: '/clientXXX/appYYY'.

Thanks in advance, 

--
Mariano
http://marianopeck.wordpress.com



--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--
Mariano
http://marianopeck.wordpress.com


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] [Seaside] Re: Back button not working with nginx and rewrites

Mariano Martinez Peck
Ohhh boy.... the back button doesn't work ONLY in Chrome.... Safari and Firefox works ok, even with nginx. 
So.....it only fails with nginx AND chrome...all the rest of the combinations work....

It seems it could to be related to redirects... google tells me I am not the only one where the back button refresh the current page instead....

I could still not make it work. If you have any idea, I would appreciate it!

Thanks, 


On Wed, Jan 22, 2014 at 11:41 PM, Dale Henrichs <[hidden email]> wrote:
I've never really done any work with nginx ... the only thing that looks suspicious to me is the `include fastcgi_params` statement ... 

I assume that you've bounced nginx and made sure that the nginx you think you are hitting is the one that you are changing? 

I know this is rudimentary, but when the impossible is happening you have to eliminate the improbable:) or something like that:)

Dale


On Wed, Jan 22, 2014 at 6:25 PM, Mariano Martinez Peck <[hidden email]> wrote:



On Wed, Jan 22, 2014 at 10:44 PM, Dale Henrichs <[hidden email]> wrote:
Mariano,

It seems that if swazoo is working fine that the nginx setup would be suspect ... 


Yes, I think the same. But I am completely clueless of what can be...
 
Could you should share your simple nginx script in case there's something there? 


Sure, this is the conf...It cannot be simpler:


      upstream seaside 
      {
        server localhost:9001;
      }
 
      upstream research 
      {
        server localhost:9005;
      }
 
 
 
      server
      {
server_name localhost;
 
        root /var/www/glass/;
   listen       443;
   ssl                  on;
   ssl_certificate      /usr/local/conf/newcert.pem;
   ssl_certificate_key  /usr/local/conf/privkey.pem;

        location / { 
try_files $uri @seaside;

        }
     
        location @seaside {
          include fastcgi_params;
          fastcgi_pass seaside;
 
          
        }
   
      }
    


Thanks Dale, 

 
Dale




On Wed, Jan 22, 2014 at 4:33 PM, Mariano Martinez Peck <[hidden email]> wrote:
mmmmm weird... I tried with one single gem (just in case) and with no rewrite....a nginx conf as simple as possible.... nothing strange, and still same problem. 

Any ideas what could be wrong? swazoo server works fine... is there anything known I should do to manage back button when using an external web server?

Thanks, 


On Wed, Jan 22, 2014 at 4:04 PM, Mariano Martinez Peck <[hidden email]> wrote:
Hi guys,

I have a seaside website in which I do some rewrites. If I use a swazoo server, the back button works as expected. However, when I deploy it using nginx + rewrites it doesn't work anymore. I do have a #updateUrl: in my main component and I can see the URL in the browser to be updated. I also see that the request is being processed. However, the page renders again the same page...so it does not goes back. _k does change as well in the browser URL.

My setup is with gemstone, nginx and fastcgi. (I cc'ed gemstone in case this is the problem.....)

Any help would be appreciated.

I paste the configuration I am using in case someone can help me.

The important part of nginx is this:

location ~* /clientXXX/appYYY {
rewrite ^/clientXXX/(.*)$ /$1 break;
try_files $uri @seasideclientXXX;
}


location @seasideclientXXX {
include fastcgi_params;
fastcgi_param REQUEST_URI $uri?$args; 
  fastcgi_pass seasideclientXXX;
  fastcgi_next_upstream error invalid_header timeout http_500;


My app is registered as 'appYYY' and I execute this in the image:

| application | 
application := WADispatcher default handlerAt: 'dp'.
application
preferenceAt: #serverProtocol put: 'https';  
preferenceAt: #serverHostname put: 'localhost';
preferenceAt: #serverPort put: 443;
preferenceAt: #serverPath put: '/clientXXX/appYYY'.

Thanks in advance, 

--
Mariano
http://marianopeck.wordpress.com



--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--
Mariano
http://marianopeck.wordpress.com




--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] [Seaside] Re: Back button not working with nginx and rewrites

Bob Arning-2
is it perhaps related to this?


On 12/2/13 8:47 AM, Bob Arning wrote:
I did a little poking around with WACounter (early seaside version 3) and..

When hitting the back button(Chrome), the screen updates correctly, but does not re-render, suggesting caching. So I requested no-caching:

renderContentOn: html

    self requestContext response doNotCache.
    html heading: Time now asString.
    html heading: count.
    html anchor
        callback: [ self increase ];
        with: '++'.
    html space.
    html anchor
        callback: [ self decrease ];
        with: '--'.
   
And still no re-render. Google found this:

http://blog.55minutes.com/2011/10/how-to-defeat-the-browser-back-button-cache/

Changing:

WAResponse>>doNotCache
    "Configure the receiver to not be cached at all."
   
    self headerAt: 'Pragma' put: 'no-cache'. "Proxies"
    self headerAt: 'Expires' putDate: self doNotCacheExpiryDate. "HTTP 1.0"
    self headerAt: 'Cache-Control' put: 'no-cache, max-age=0, must-revalidate, no-store'. "HTTP 1.1"

and now it re-renders on a back button. HTH

On 1/23/14 9:08 AM, Mariano Martinez Peck wrote:
Ohhh boy.... the back button doesn't work ONLY in Chrome.... Safari and Firefox works ok, even with nginx. 
So.....it only fails with nginx AND chrome...all the rest of the combinations work....

It seems it could to be related to redirects... google tells me I am not the only one where the back button refresh the current page instead....

I could still not make it work. If you have any idea, I would appreciate it!

Thanks, 


On Wed, Jan 22, 2014 at 11:41 PM, Dale Henrichs <[hidden email]> wrote:
I've never really done any work with nginx ... the only thing that looks suspicious to me is the `include fastcgi_params` statement ... 

I assume that you've bounced nginx and made sure that the nginx you think you are hitting is the one that you are changing? 

I know this is rudimentary, but when the impossible is happening you have to eliminate the improbable:) or something like that:)

Dale


On Wed, Jan 22, 2014 at 6:25 PM, Mariano Martinez Peck <[hidden email]> wrote:



On Wed, Jan 22, 2014 at 10:44 PM, Dale Henrichs <[hidden email]> wrote:
Mariano,

It seems that if swazoo is working fine that the nginx setup would be suspect ... 


Yes, I think the same. But I am completely clueless of what can be...
 
Could you should share your simple nginx script in case there's something there? 


Sure, this is the conf...It cannot be simpler:


      upstream seaside 
      {
        server localhost:9001;
      }
 
      upstream research 
      {
        server localhost:9005;
      }
 
 
 
      server
      {
server_name localhost;
 
        root /var/www/glass/;
   listen       443;
   ssl                  on;
   ssl_certificate      /usr/local/conf/newcert.pem;
   ssl_certificate_key  /usr/local/conf/privkey.pem;

        location / { 
try_files $uri @seaside;

        }
     
        location @seaside {
          include fastcgi_params;
          fastcgi_pass seaside;
 
          
        }
   
      }
    


Thanks Dale, 

 
Dale




On Wed, Jan 22, 2014 at 4:33 PM, Mariano Martinez Peck <[hidden email]> wrote:
mmmmm weird... I tried with one single gem (just in case) and with no rewrite....a nginx conf as simple as possible.... nothing strange, and still same problem. 

Any ideas what could be wrong? swazoo server works fine... is there anything known I should do to manage back button when using an external web server?

Thanks, 


On Wed, Jan 22, 2014 at 4:04 PM, Mariano Martinez Peck <[hidden email]> wrote:
Hi guys,

I have a seaside website in which I do some rewrites. If I use a swazoo server, the back button works as expected. However, when I deploy it using nginx + rewrites it doesn't work anymore. I do have a #updateUrl: in my main component and I can see the URL in the browser to be updated. I also see that the request is being processed. However, the page renders again the same page...so it does not goes back. _k does change as well in the browser URL.

My setup is with gemstone, nginx and fastcgi. (I cc'ed gemstone in case this is the problem.....)

Any help would be appreciated.

I paste the configuration I am using in case someone can help me.

The important part of nginx is this:

location ~* /clientXXX/appYYY {
rewrite ^/clientXXX/(.*)$ /$1 break;
try_files $uri @seasideclientXXX;
}


location @seasideclientXXX {
include fastcgi_params;
fastcgi_param REQUEST_URI $uri?$args; 
  fastcgi_pass seasideclientXXX;
  fastcgi_next_upstream error invalid_header timeout http_500;


My app is registered as 'appYYY' and I execute this in the image:

| application | 
application := WADispatcher default handlerAt: 'dp'.
application
preferenceAt: #serverProtocol put: 'https';  
preferenceAt: #serverHostname put: 'localhost';
preferenceAt: #serverPort put: 443;
preferenceAt: #serverPath put: '/clientXXX/appYYY'.

Thanks in advance, 

--
Mariano
http://marianopeck.wordpress.com



--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--
Mariano
http://marianopeck.wordpress.com




--
Mariano
http://marianopeck.wordpress.com


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] [Seaside] Re: Back button not working with nginx and rewrites

Mariano Martinez Peck



On Thu, Jan 23, 2014 at 11:21 AM, Bob Arning <[hidden email]> wrote:
is it perhaps related to this?


Hi Bob,

Thanks for the suggestion. I tried that but same problem :(

Thanks anyway!
 

On 12/2/13 8:47 AM, Bob Arning wrote:
I did a little poking around with WACounter (early seaside version 3) and..

When hitting the back button(Chrome), the screen updates correctly, but does not re-render, suggesting caching. So I requested no-caching:

renderContentOn: html

    self requestContext response doNotCache.
    html heading: Time now asString.
    html heading: count.
    html anchor
        callback: [ self increase ];
        with: '++'.
    html space.
    html anchor
        callback: [ self decrease ];
        with: '--'.
   
And still no re-render. Google found this:

http://blog.55minutes.com/2011/10/how-to-defeat-the-browser-back-button-cache/

Changing:

WAResponse>>doNotCache
    "Configure the receiver to not be cached at all."
   
    self headerAt: 'Pragma' put: 'no-cache'. "Proxies"
    self headerAt: 'Expires' putDate: self doNotCacheExpiryDate. "HTTP 1.0"
    self headerAt: 'Cache-Control' put: 'no-cache, max-age=0, must-revalidate, no-store'. "HTTP 1.1"

and now it re-renders on a back button. HTH

On 1/23/14 9:08 AM, Mariano Martinez Peck wrote:
Ohhh boy.... the back button doesn't work ONLY in Chrome.... Safari and Firefox works ok, even with nginx. 
So.....it only fails with nginx AND chrome...all the rest of the combinations work....

It seems it could to be related to redirects... google tells me I am not the only one where the back button refresh the current page instead....

I could still not make it work. If you have any idea, I would appreciate it!

Thanks, 


On Wed, Jan 22, 2014 at 11:41 PM, Dale Henrichs <[hidden email]> wrote:
I've never really done any work with nginx ... the only thing that looks suspicious to me is the `include fastcgi_params` statement ... 

I assume that you've bounced nginx and made sure that the nginx you think you are hitting is the one that you are changing? 

I know this is rudimentary, but when the impossible is happening you have to eliminate the improbable:) or something like that:)

Dale


On Wed, Jan 22, 2014 at 6:25 PM, Mariano Martinez Peck <[hidden email]> wrote:



On Wed, Jan 22, 2014 at 10:44 PM, Dale Henrichs <[hidden email]> wrote:
Mariano,

It seems that if swazoo is working fine that the nginx setup would be suspect ... 


Yes, I think the same. But I am completely clueless of what can be...
 
Could you should share your simple nginx script in case there's something there? 


Sure, this is the conf...It cannot be simpler:


      upstream seaside 
      {
        server localhost:9001;
      }
 
      upstream research 
      {
        server localhost:9005;
      }
 
 
 
      server
      {
server_name localhost;
 
        root /var/www/glass/;
   listen       443;
   ssl                  on;
   ssl_certificate      /usr/local/conf/newcert.pem;
   ssl_certificate_key  /usr/local/conf/privkey.pem;

        location / { 
try_files $uri @seaside;

        }
     
        location @seaside {
          include fastcgi_params;
          fastcgi_pass seaside;
 
          
        }
   
      }
    


Thanks Dale, 

 
Dale




On Wed, Jan 22, 2014 at 4:33 PM, Mariano Martinez Peck <[hidden email]> wrote:
mmmmm weird... I tried with one single gem (just in case) and with no rewrite....a nginx conf as simple as possible.... nothing strange, and still same problem. 

Any ideas what could be wrong? swazoo server works fine... is there anything known I should do to manage back button when using an external web server?

Thanks, 


On Wed, Jan 22, 2014 at 4:04 PM, Mariano Martinez Peck <[hidden email]> wrote:
Hi guys,

I have a seaside website in which I do some rewrites. If I use a swazoo server, the back button works as expected. However, when I deploy it using nginx + rewrites it doesn't work anymore. I do have a #updateUrl: in my main component and I can see the URL in the browser to be updated. I also see that the request is being processed. However, the page renders again the same page...so it does not goes back. _k does change as well in the browser URL.

My setup is with gemstone, nginx and fastcgi. (I cc'ed gemstone in case this is the problem.....)

Any help would be appreciated.

I paste the configuration I am using in case someone can help me.

The important part of nginx is this:

location ~* /clientXXX/appYYY {
rewrite ^/clientXXX/(.*)$ /$1 break;
try_files $uri @seasideclientXXX;
}


location @seasideclientXXX {
include fastcgi_params;
fastcgi_param REQUEST_URI $uri?$args; 
  fastcgi_pass seasideclientXXX;
  fastcgi_next_upstream error invalid_header timeout http_500;


My app is registered as 'appYYY' and I execute this in the image:

| application | 
application := WADispatcher default handlerAt: 'dp'.
application
preferenceAt: #serverProtocol put: 'https';  
preferenceAt: #serverHostname put: 'localhost';
preferenceAt: #serverPort put: 443;
preferenceAt: #serverPath put: '/clientXXX/appYYY'.

Thanks in advance, 

--
Mariano
http://marianopeck.wordpress.com



--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--
Mariano
http://marianopeck.wordpress.com




--
Mariano
http://marianopeck.wordpress.com


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] [Seaside] Re: Back button not working with nginx and rewrites

Dale Henrichs-3
In reply to this post by Mariano Martinez Peck
You mean that google admits that they have a problem with Chrome, but don't have a suggested workaround?

Dale


On Thu, Jan 23, 2014 at 6:08 AM, Mariano Martinez Peck <[hidden email]> wrote:
Ohhh boy.... the back button doesn't work ONLY in Chrome.... Safari and Firefox works ok, even with nginx. 
So.....it only fails with nginx AND chrome...all the rest of the combinations work....

It seems it could to be related to redirects... google tells me I am not the only one where the back button refresh the current page instead....

I could still not make it work. If you have any idea, I would appreciate it!

Thanks, 


On Wed, Jan 22, 2014 at 11:41 PM, Dale Henrichs <[hidden email]> wrote:
I've never really done any work with nginx ... the only thing that looks suspicious to me is the `include fastcgi_params` statement ... 

I assume that you've bounced nginx and made sure that the nginx you think you are hitting is the one that you are changing? 

I know this is rudimentary, but when the impossible is happening you have to eliminate the improbable:) or something like that:)

Dale


On Wed, Jan 22, 2014 at 6:25 PM, Mariano Martinez Peck <[hidden email]> wrote:



On Wed, Jan 22, 2014 at 10:44 PM, Dale Henrichs <[hidden email]> wrote:
Mariano,

It seems that if swazoo is working fine that the nginx setup would be suspect ... 


Yes, I think the same. But I am completely clueless of what can be...
 
Could you should share your simple nginx script in case there's something there? 


Sure, this is the conf...It cannot be simpler:


      upstream seaside 
      {
        server localhost:9001;
      }
 
      upstream research 
      {
        server localhost:9005;
      }
 
 
 
      server
      {
server_name localhost;
 
        root /var/www/glass/;
   listen       443;
   ssl                  on;
   ssl_certificate      /usr/local/conf/newcert.pem;
   ssl_certificate_key  /usr/local/conf/privkey.pem;

        location / { 
try_files $uri @seaside;

        }
     
        location @seaside {
          include fastcgi_params;
          fastcgi_pass seaside;
 
          
        }
   
      }
    


Thanks Dale, 

 
Dale




On Wed, Jan 22, 2014 at 4:33 PM, Mariano Martinez Peck <[hidden email]> wrote:
mmmmm weird... I tried with one single gem (just in case) and with no rewrite....a nginx conf as simple as possible.... nothing strange, and still same problem. 

Any ideas what could be wrong? swazoo server works fine... is there anything known I should do to manage back button when using an external web server?

Thanks, 


On Wed, Jan 22, 2014 at 4:04 PM, Mariano Martinez Peck <[hidden email]> wrote:
Hi guys,

I have a seaside website in which I do some rewrites. If I use a swazoo server, the back button works as expected. However, when I deploy it using nginx + rewrites it doesn't work anymore. I do have a #updateUrl: in my main component and I can see the URL in the browser to be updated. I also see that the request is being processed. However, the page renders again the same page...so it does not goes back. _k does change as well in the browser URL.

My setup is with gemstone, nginx and fastcgi. (I cc'ed gemstone in case this is the problem.....)

Any help would be appreciated.

I paste the configuration I am using in case someone can help me.

The important part of nginx is this:

location ~* /clientXXX/appYYY {
rewrite ^/clientXXX/(.*)$ /$1 break;
try_files $uri @seasideclientXXX;
}


location @seasideclientXXX {
include fastcgi_params;
fastcgi_param REQUEST_URI $uri?$args; 
  fastcgi_pass seasideclientXXX;
  fastcgi_next_upstream error invalid_header timeout http_500;


My app is registered as 'appYYY' and I execute this in the image:

| application | 
application := WADispatcher default handlerAt: 'dp'.
application
preferenceAt: #serverProtocol put: 'https';  
preferenceAt: #serverHostname put: 'localhost';
preferenceAt: #serverPort put: 443;
preferenceAt: #serverPath put: '/clientXXX/appYYY'.

Thanks in advance, 

--
Mariano
http://marianopeck.wordpress.com



--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--
Mariano
http://marianopeck.wordpress.com




--
Mariano
http://marianopeck.wordpress.com


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] [Seaside] Re: Back button not working with nginx and rewrites

Johan Brichau-2
Mariano,

Just in case: are you using latest Seaside version?
Something related was recently fixed: https://code.google.com/p/seaside/issues/detail?id=772

Johan

On 23 Jan 2014, at 21:11, Dale Henrichs <[hidden email]> wrote:

> You mean that google admits that they have a problem with Chrome, but don't have a suggested workaround?
>
> Dale
>
>
> On Thu, Jan 23, 2014 at 6:08 AM, Mariano Martinez Peck <[hidden email]> wrote:
> Ohhh boy.... the back button doesn't work ONLY in Chrome.... Safari and Firefox works ok, even with nginx.
> So.....it only fails with nginx AND chrome...all the rest of the combinations work....
>
> It seems it could to be related to redirects... google tells me I am not the only one where the back button refresh the current page instead....
>
> I could still not make it work. If you have any idea, I would appreciate it!
>
> Thanks,
>
>
> On Wed, Jan 22, 2014 at 11:41 PM, Dale Henrichs <[hidden email]> wrote:
> I've never really done any work with nginx ... the only thing that looks suspicious to me is the `include fastcgi_params` statement ...
>
> I assume that you've bounced nginx and made sure that the nginx you think you are hitting is the one that you are changing?
>
> I know this is rudimentary, but when the impossible is happening you have to eliminate the improbable:) or something like that:)
>
> Dale
>
>
> On Wed, Jan 22, 2014 at 6:25 PM, Mariano Martinez Peck <[hidden email]> wrote:
>
>
>
> On Wed, Jan 22, 2014 at 10:44 PM, Dale Henrichs <[hidden email]> wrote:
> Mariano,
>
> It seems that if swazoo is working fine that the nginx setup would be suspect ...
>
>
> Yes, I think the same. But I am completely clueless of what can be...
>  
> Could you should share your simple nginx script in case there's something there?
>
>
> Sure, this is the conf...It cannot be simpler:
>
>
>       upstream seaside
>       {
>         server localhost:9001;
>       }
>  
>       upstream research
>       {
>         server localhost:9005;
>       }
>  
>  
>  
>       server
>       {
>
> server_name localhost;
>
>         root /var/www/glass/;
>
>    listen       443;
>    ssl                  on;
>    ssl_certificate      /usr/local/conf/newcert.pem;
>    ssl_certificate_key  /usr/local/conf/privkey.pem;
>
>
>         location / {
>
> try_files $uri @seaside;
>
>         }
>      
>         location @seaside {
>
>           include fastcgi_params;
>           fastcgi_pass seaside;
>  
>          
>         }
>
>    
>
>       }
>    
>
>
>
> Thanks Dale,
>
>  
> Dale
>
>
>
>
> On Wed, Jan 22, 2014 at 4:33 PM, Mariano Martinez Peck <[hidden email]> wrote:
> mmmmm weird... I tried with one single gem (just in case) and with no rewrite....a nginx conf as simple as possible.... nothing strange, and still same problem.
>
> Any ideas what could be wrong? swazoo server works fine... is there anything known I should do to manage back button when using an external web server?
>
> Thanks,
>
>
> On Wed, Jan 22, 2014 at 4:04 PM, Mariano Martinez Peck <[hidden email]> wrote:
> Hi guys,
>
> I have a seaside website in which I do some rewrites. If I use a swazoo server, the back button works as expected. However, when I deploy it using nginx + rewrites it doesn't work anymore. I do have a #updateUrl: in my main component and I can see the URL in the browser to be updated. I also see that the request is being processed. However, the page renders again the same page...so it does not goes back. _k does change as well in the browser URL.
>
> My setup is with gemstone, nginx and fastcgi. (I cc'ed gemstone in case this is the problem.....)
>
> Any help would be appreciated.
>
> I paste the configuration I am using in case someone can help me.
>
> The important part of nginx is this:
>
> location ~* /clientXXX/appYYY {
> rewrite ^/clientXXX/(.*)$ /$1 break;
> try_files $uri @seasideclientXXX;
> }
>
>
> location @seasideclientXXX {
> include fastcgi_params;
> fastcgi_param REQUEST_URI $uri?$args;
>   fastcgi_pass seasideclientXXX;
>   fastcgi_next_upstream error invalid_header timeout http_500;
> }
>
>
> My app is registered as 'appYYY' and I execute this in the image:
>
> | application |
> application := WADispatcher default handlerAt: 'dp'.
> application
> preferenceAt: #serverProtocol put: 'https';  
> preferenceAt: #serverHostname put: 'localhost';
> preferenceAt: #serverPort put: 443;
> preferenceAt: #serverPath put: '/clientXXX/appYYY'.
>
>
> Thanks in advance,
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
> _______________________________________________
> Glass mailing list
> [hidden email]
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside