Error 404 on site.com/invoice/setup

Fix at post #3
Hello,

I tried to run InvoicePlane on my vps. I use nginx and I have PHP7.0. Database is externaly hosted, not on my vps.
I put all of the files in [root_directory]/invoice
This is my .htaccess (in the subfolder /invoice) :

RewriteEngine on
RewriteBase /invoice
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

But when I try to access site.com/invoice/setup I have a 404 error, not found.
Why I’ve got this error, there a specific configuration for nginx ?

Thanks for your help !

Please take a look at these topics:

https://community2.invoiceplane.com/t/topic/2654
https://community2.invoiceplane.com/t/topic/2613

1 Like

It works with this (second topic) :
This is my XX.fr in /etc/nginx/sites-available

server {
    listen 80;
    listen [::]:80;
    server_name XXX.fr;

    index index.php index.html;
    root /var/www/XXXX.fr;

    location ~* \.php$ {
        include       /etc/nginx/fastcgi_params;
        fastcgi_pass  unix:/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

    location ~* \.(?:html|css|jpg|jpeg|png|gif|ico|js|woff|eot|svg|ttf)$ {
        expires 1M;
        add_header Cache-Control "public";
    }

    location /.well-known/acme-challenge/ {
        alias /var/run/acme/acme-challenge/;
    }

    location /invoice {
    try_files $uri $uri/ /invoice/index.php?q=$uri;
    }
}

Thank you very much !