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;
  }
}
  • 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 '14 at 12:06
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;
  }
}
| improve this answer | |
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.

| improve this answer | |
  • 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 '14 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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