3

https://xxx.xxx.xxx/themes/third_party/cartthrob/lib/extload.php

works fine, but

https://xxx.xxx.xxx/themes/third_party/cartthrob/lib/extload.php/sage_s

returns a 404.

My nginx server config is as follows:

server {
  listen 443 default_server ssl;
  ssl_certificate /etc/nginx/ssl/xxx_xxx_xxx.pem;
  ssl_certificate_key /etc/nginx/ssl/xxx_xxx_xxx.key;
  server_name xxx.xxx.xxx;
  root /sites/xxx_xxx_xxx/public_html;

  access_log /var/log/nginx/xxx_xxx_xxx-access.log;
  error_log  /var/log/nginx/xxx_xxx_xxx-error.log info;

  location / {
    index index.php;
    try_files $uri $uri/ @ee;
  }

  location @ee {
    rewrite ^(.*) /index.php?$1 last;
  }

  location ~ \.php$ {
    include /etc/nginx/fastcgi_params;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php5;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  }
}
1
  • try to add after error_log next lines: location /themes/third_party/cartthrob/lib/extload.php { rewrite ^(.*) /themes/third_party/cartthrob/lib/extload.php?$1 last; }
    – Max Lazar
    Feb 11, 2014 at 12:06

2 Answers 2

3

try next config:

server {
  listen 443 default_server ssl;
  ssl_certificate /etc/nginx/ssl/xxx_xxx_xxx.pem;
  ssl_certificate_key /etc/nginx/ssl/xxx_xxx_xxx.key;
  server_name xxx.xxx.xxx;
  root /sites/xxx_xxx_xxx/public_html;

  access_log /var/log/nginx/xxx_xxx_xxx-access.log;
  error_log  /var/log/nginx/xxx_xxx_xxx-error.log info;

  location /themes/third_party/cartthrob/lib/extload.php { 
    rewrite ^(.*) /themes/third_party/cartthrob/lib/extload.php?$1 last; 
  }

  location / {
    index index.php;
    try_files $uri $uri/ @ee;
  }

  location @ee {
    rewrite ^(.*) /index.php?$1 last;
  }

  location ~ \.php$ {
    include /etc/nginx/fastcgi_params;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php5;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  }
}
0
1

Ensure your firewalls allow outbound Port 443 (HTTPS only) & inbound ports 443 (& optionally 80 HTTP) access in order to communicate with our servers (on Test/Live).

Check not a DNS issue if not receiving our (Sage Pays) Notification post.

What are the main differences between the two NotificationURLs?

When acknowledging Sage Pays notification post, when you send the Status, StatusDetail and RedirectURL, make sure you clear your response buffer to remove header code, comments or HTML as Sage Pay Server will expect "Status=" to be first characters in the response.

1
  • Hi! Thanks for responding, but this issue is almost certainly related to my nginx configuration. I'm hoping someone else has had the same issue and will be able to let me know how to configure nginx correctly. Everything else seems to be working fine - including Cartthrob and Sagepay.
    – Dan Herd
    Feb 10, 2014 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.