Jump to content

Error 404 In payment with rewriting url "Nginx"


LBR

Recommended Posts

Hello guys, 

I have a PS store 1.6.1.2, with Nginx 0.9.8 and php-fpm. 

It is running almost 100%, just missing the Boleto and Transfer are. When I finish the payment a 404 error is generated. 

 

By my tests when I disable the rewrite url it works perfectly. 

 

Anyone know or could help me what parameters need to add in nginx for rewrite ticket generation and bank transfer? 

 

Here is the url he tries to rewrite: 

 

 

Transferência: 


 

Boleto 


 

My confg in prestashop: 

 

ssl on; 

ssl_certificate /home/admin/conf/web/ssl.em4patas.com.br.pem; 

ssl_certificate_key /home/admin/conf/web/ssl.em4patas.com.br.key; 

 

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; 

rewrite ^/page-not-found$ /index.php?controller=404 last; 

rewrite ^/address$ /index.php?controller=address last; 

rewrite ^/addresses$ /index.php?controller=addresses last; 

rewrite ^/authentication$ /index.php?controller=authentication last; 

rewrite ^/best-sales$ /index.php?controller=best-sales last; 

rewrite ^/cart$ /index.php?controller=cart last; 

rewrite ^/contact-us$ /index.php?controller=contact-form last; 

rewrite ^/discount$ /index.php?controller=discount last; 

rewrite ^/guest-tracking$ /index.php?controller=guest-tracking last; 

rewrite ^/order-history$ /index.php?controller=history last; 

rewrite ^/identity$ /index.php?controller=identity last; 

rewrite ^/manufacturers$ /index.php?controller=manufacturer last; 

rewrite ^/my-account$ /?controller=authentication&back=my-account last; 

rewrite ^/new-products$ /index.php?controller=new-products last; 

rewrite ^/order$ /index.php?controller=order last; 

rewrite ^/order-follow$ /index.php?controller=order-follow last; 

rewrite ^/quick-order$ /index.php?controller=order-opc last; 

rewrite ^/order-slip$ /index.php?controller=order-slip last; 

rewrite ^/password-recovery$ /index.php?controller=password last; 

rewrite ^/prices-drop$ /index.php?controller=prices-drop last; 

rewrite ^/search$ /index.php?controller=search last; 

rewrite ^/sitemap$ /index.php?controller=sitemap last; 

rewrite ^/stores$ /index.php?controller=stores last; 

rewrite ^/supplier$ /index.php?controller=supplier last; 

rewrite "^/module/([_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)$" /index.php?fc=module&module=$1&controller=$2 last; 

 

location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { 

expires max; 


 

location ~ [^/]\.php(/|$) { 

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 

if (!-f $document_root$fastcgi_script_name) { 

return 404; 


 

fastcgi_pass 127.0.0.1:9001; 

fastcgi_index index.php; 

include /etc/nginx/fastcgi_params; 


 

 

error_page 403 /error/404.html; 

error_page 404 /error/404.html; 

error_page 500 502 503 504 /error/50x.html; 

 

location /error/ { 

alias /home/admin/web/em4patas.com.br/document_errors/; 


 

location ~* "/\.(htaccess|htpasswd)$" { 

deny all; 

return 404; 


 

location /vstats/ { 

alias /home/admin/web/em4patas.com.br/stats/; 

include /home/admin/web/em4patas.com.br/stats/auth.conf*; 


 

include /etc/nginx/conf.d/phpmyadmin.inc*; 

include /etc/nginx/conf.d/phppgadmin.inc*; 

include /etc/nginx/conf.d/webmail.inc*; 

 

include /home/admin/conf/web/snginx.em4patas.com.br.conf*;

Link to comment
Share on other sites

  • 5 months later...

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...