Closed LiloBzH closed 1 year ago
To get more debug info you can edit the line 24 in init.php in the root, set this:
define('MTT_DEBUG', true);
By clicking on top red error you should see a details.
Do you use SSL in nginx? If yes, Do you send any flag about https with fastcgi?
With MTT_DEBUG, In "SHOW DETAILS", i have all HTML code of index Page. 0 error.
My Conf NGINX is really classic i think :
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name todo.mondomaine.ovh;
ssl_certificate /etc/letsencrypt/live/mondomaine.ovh/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mondomaine.ovh/privkey.pem;
include conf.maison/code_ssl_lets_encrypt;
access_log /var/log/nginx/todo.mondomaine.ovh-access.log;
error_log /var/log/nginx/todo.mondomaine.ovh-error.log;
root /var/www/mondomaine.ovh/todo.mondomaine.ovh/;
location / {
index index.php;
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php8.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
include fastcgi_params;
}
}
It's not probably a PHP error. I have no log in Error nginx
If you see the sources of home page in details I think this is a try_files directive work, api url not found.
Try to manually open api url in browser like: /api.php/foo
You should see: Unknown command . This means php is ok.
api.php requires PATH_INFO, please add
fastcgi_param PATH_INFO $fastcgi_path_info;
to nginx config.
https://todo.mld.ovh/api.php/foo => Show INDEX.PHP
so that's probablement the problem ?
https://todo.mld.ovh/api.php/foo => Show INDEX.PHP
so that's probablement the problem ?
Yes, this the issue
This is how I set up nginx:
location / {
try_files $uri $uri/ =404;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_index index.php;
fastcgi_pass fpm;
}
location /db/ {
return 404; #deny all
}
location /includes/ {
return 404; #deny all
}
location ~ /\.ht {
return 404; #deny all
}
ahh well done ...
NGINX configuration is a mystery to me sometimes.
Required changes in your config:
location ~ [^/]\.php(/|$)
and
fastcgi_param PATH_INFO $fastcgi_path_info;
Hi
a re open a ticket Y tried update or fresh install => same issue
I dont see any error. Debug mode ?
NGINX with PHP Version 8.1
weird