Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298650

Drupal 8 (with Nginx): Ajax Http Error on every Ajax Callback (Form API)

$
0
0

Hello,

I am using Drupal 8.6.5 on Xampp and Nginx both with PHP Version 7.3
The problem is whenever I use Ajax Callback Functions with Form, Ajax Http Error 200 is thrown.
Also this problem arises only with Nginx setup, the same code works well with Xampp.

I have attached images for the same (Tested on Chrome & Firefox - Drupal 8.6.5 with Nginx).

Please help.

NGINX Configuration

server {
listen 80 default_server;
listen [::]:80 default_server;

root /usr/share/nginx/html/xornet_pre_prod;
index index.php index.html index.htm index.nginx-debian.html;

server_name 10.21.1.91;

location / {
#try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php$is_args$args;
}

location ~ \.php(/|$) {


fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param QUERY_STRING $query_string;
    fastcgi_intercept_errors on;
    fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_read_timeout 12000;
}

location ~ /\.ht {
deny all;
}
location /phpmyadmin {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                       include /etc/nginx/fastcgi_params;
               }
               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
        location /phpMyAdmin {
               rewrite ^/* /phpmyadmin last;
        }

        location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
        try_files $uri @rewrite;
        expires max;
        log_not_found off;
    }
location @rewrite {
    # Some modules enforce no slash (/) at the end of the URL
    # Else this rewrite block wouldn't be needed (GlobalRedirect)
    rewrite ^/(.*)$ /index.php?q=$1;
  }
}

Viewing all articles
Browse latest Browse all 298650


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>