404 Not Found (nginx +php-fpm)

Natalia_K
Natalia_K
Offline
0
Hi, I installed Affiliate Tracker on server with nginx and php fpm. After submitting new account I got 404 error ( the button "cancel" works fine). On Denwer with the same site and on a hosting with apache and nginx and another test site it works without errors. I think it is because of nginx rewrite rules (when I change 404 in the code on 405, it also changes on 405 after submitting). Here's part of the nginx code for joomla 2.5:

location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @php;
}
location @php {
fastcgi_index index.php;
fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f info@mysite.ru";
fastcgi_pass unix:/var/www/php-fpm/myuser.sock;
fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
try_files $uri =404;
include fastcgi_params;
}

I tried different variants of rewrite, but they also don't work.
Please, tell me how to change this code or code of your component to escape the error.
Responses (5)
  • Accepted Answer

    Natalia_K
    Natalia_K
    Offline
    Wednesday, December 02 2015, 07:38 PM - #Permalink
    0
    Oh, code is displayed in wrong way. I'll try to insert it again:
    location / {
    try_files $uri $uri/ /index.php?$args;
    }
    location ~ [^/]\.ph(p\d*|tml)$ {
    try_files /does_not_exists @php;
    }
    location @php {
    fastcgi_index index.php;
    fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f info@mysite.ru";
    fastcgi_pass unix:/var/www/php-fpm/myuser.sock;
    fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
    try_files $uri =404;
    include fastcgi_params;
    }
    • Natalia_K
      more than a month ago
      There no smile, it must be : and p.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, December 03 2015, 11:33 AM - #Permalink
    0
    hello

    this must be an error on the redirection set on the server.. this should work normally on any Joomla installation... your other forms work ok?
    The reply is currently minimized Show
  • Accepted Answer

    Natalia_K
    Natalia_K
    Offline
    Thursday, December 03 2015, 12:15 PM - #Permalink
    0
    Yes, all other components (kunena forum, akeeba subscriptions, acy mailing, one click registration) work without errors. Your extension also worked fine on local server and on hosting with apache +nginx. Backend forms is ok on this server, but on frontend I see only first 2 pages. And no strings are inserted into database after submitting. I saw the same problem here: http://www.joomlathat.com/support/affiliate-tracker/after-submitting-the-registration-form-i-get-404-not-found . How did you resolve it?
    The reply is currently minimized Show
  • Accepted Answer

    Natalia_K
    Natalia_K
    Offline
    Thursday, December 03 2015, 02:29 PM - #Permalink
    0
    I found how to resolve the problem. In the site\components\com_affiliatetracker\views\account\tmpl\form.php I saw that form action called index.php, that phisically don't exist. So restriction of the server don't allow to call not existing file. When I changed the string 22 :
    to
    "
    the submit button began to work. I created an account and see it in frontend and backend.
    May be, you can give more right string for form action? Correct me, please, if I am wrong.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, December 03 2015, 04:44 PM - #Permalink
    0
    hello,
    if this helps, great, go ahead. but again, this is somehow related to your server routing configuration.. in a "normal" joomla installation, this "index.php" will be correctly routed to the route of the site.

    good work, anyway!
    The reply is currently minimized Show
Your Reply