Cannot login - api.php returns 404 error
Closed this issue · 1 comments
Hello,
First of all, thank you for this awesome job !
I have successfully installed plainpad on Debian bullseye. I have created a mysql database and a reverse proxy on nginx.
The sign-in page loads well but when I click on the Login button I get the following prompt message :
"Something went wrong while loggin you in, please try again."
The developer console displays the following warning :
"GET https://mydomain.com/api.php/v1/ 404"
When I type "mydomain.com/api.php" in my browser and I Get a 404 page. However the "api.php" file exists in the "public" directory.
I created a php.info file in the "public" directory which is correctly loaded from the server when I type "mydomain.com/php.info".
This my ngnix set up :
` server {
listen 80;
listen [::]:80;
server_name mydomain.com;
return 301 https://$server_name$request_uri;
}
server
{
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name mydomain.com;
root /var/www/mydomain.com/plainpad/public;
index index.html index.php;
ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/mydomain.com/chain.pem;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
include snippets/fastcgi-php.conf;
}
}
I would be very grateful for you help !
David
Hello!
Thanks for trying out Plainpad.
Try changing the PHP parsing part of your NGINX configuration to something like this:
location ~ ^.+.php {
include snippets/fastcgi-php.conf;
fastcgi_split_path_info ^(.+?.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
}
Alex Tselegidis, Plainpad Creator Need a customization? Get a free quote! |