Error 404 on

Fix at post #3

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 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:

1 Like

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

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

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

    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 !