Jump to content

Logout Doesn't Work - Is This A Nginx Problem?


dusticelli

Recommended Posts

Hi,

 

hopefully someone can help me here and I am in the right forum with my issue.

 

I am having a problem with logout, that does not work. It is in my fresh stadard prestashop 1.6.1.4 installation. You can have a testride here

 

http://188.68.52.113/prestademo/

 

Probably I guess this might be caused by Nginx Server Configuration, but I have no Idea, how to check the cause of this behavior and how to fix it.

 

I didn't find any other related post.

Link to comment
Share on other sites

Update:

 

I actually understood that this is related by searchengine frirendly urls. When I deactivate them, logout works. If activate, it doesn't work.

 

In the nginx server configuration I have added the snippet (number of lines) that are described inside the actual prestashop documentation. Obviosly this is not enough. Does anyone know how I can achieve the logout working as well?

Link to comment
Share on other sites

Hi Arnaud_69, hi blankstore,

 

I don't think it would be a good Idea to use workaround from older Version (1.4.11). I have made a look to the related passage and in the meantime it is already different to the state posted for 1.4.11.

 

Important would be to know if you guys are using "Nginx" as the servers software.

 

If yes, I guess what we all need is an additional rewriterule.  At the moment I have just these lines from the documentation

 

http://doc.prestashop.com/display/PS16/System+Administrator+Guide

 

 

 

location / {

  index /index.php;
 
  rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last;
  rewrite ^/([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$1$2.jpg last;
  rewrite ^/([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$1$2$3.jpg last;
  rewrite ^/([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$1$2$3$4.jpg last;
  rewrite ^/([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg last;
  rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg last;
  rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg last;
  rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg last;
  rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg last;
  rewrite ^/c/([0-9]+)(-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2.jpg last;
  rewrite ^/c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ /img/c/$1.jpg last;
  rewrite ^/([0-9]+)(-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2.jpg last;
  try_files $uri $uri/ /index.php?$args;
}

 

I found plenty of different config examples in the for using it with the nginx.  Most of them did have some more directives than this example from the prestashop docs.

 

My Problem is, I am not to familiar with this server scripting stuff. But maybe obe 

Link to comment
Share on other sites

Hi Arnaud_69,

 

that's going weired now. I have made 2 fresh installations on my server. 

 

1. with standard prestashop bootstrap theme

 

2. the other with a slimmed bare bootstrap theme (which is a prestashop community project)

 

 

Server Configuration is exactly the same on both installations. The first one do have the logout problem. the second one not!

 

I am on Nginx 1.8.0 and PHP FPM

Link to comment
Share on other sites

Yes.

 

But in the meantime I found that to me the problem only occurs if seo-urls are enabled and I am using more than 1 language. In this case the languague code like (de,fr,es,en etc) is added to the url and the log out doesn't work. When I switch to 1 language or when I diesable seo-urls the logout problem is gone.

 

So I guess this might be still a rewriting problem with nginx unofrtunatly still didn't find any soloution...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...