I am getting a XML Parsing Error: not well-formed with Ajax chat by Frug with nginx its working fine with httpd with i dont want to use httpd
os : centos 8
php : 7.4.1
nginx : 1.14
the url looks like this :
https://mysite.tk/shout/?ajax=true&lastID=0&getInfos=useā¦%2CuserName%2CuserRole%2CchannelID%2CchannelName&channelID=0
my nginx sever block conf
server {
root /var/www/html;
server_name mysite.tk
index index.php;
location / {
try_files $uri /index.php
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(.*)$;
try_files $uri =404;
fastcgi_pass unix:/run/php-fpm/www.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_read_timeout 360;
fastcgi_send_timeout 360;
fastcgi_connect_timeout 360;
include fastcgi_params;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/mysite.tk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mysite.tk/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# server {
# listen 2087;
# root /var/www/html;
# server_name backend.mysite.tk;
# index index.html index.php;
# location / {
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# real_ip_header X-Forwarded-For;
# include fastcgi_params;
# proxy_pass http://localhost:6670;
# }
# }
server {
if ($host = mysite.tk) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name mysite.tk
index index.php;
return 404; # managed by Certbot
}
my nginx.conf file
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
types_hash_max_size 2048;
server_tokens off;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
Regards
Edited 1 time(s). Last edit at 01/07/2020 04:04AM by umair33.