Selfhosting setup failing

Hi Hilel,

thansk for the reply. I tryed with TRUSTED_PROXIES but that didnt help.

config of rev proxy that passes the traffic to the VM:

server {
listen 80;
listen [::]:80;
server_name invoice.example.com
access_log /var/log/nginx/reverse-access.log;
error_log /var/log/nginx/reverse-error.log;

   location / {
                proxy_pass http://192.168.122.107;

}
}

config of the nginx on VM (invoiceninja)

server {
listen 80;
server_name invoice.example.com;

root /var/www/invoice-ninja/public/;
index index.php index.html index.htm;
charset utf-8;

location / {
    try_files $uri $uri/ /index.php?$query_string;
}

location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt  { access_log off; log_not_found off; }

access_log  /var/log/nginx/invoiceninja.access.log;
error_log   /var/log/nginx/invoiceninja.error.log;

location ~ \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/run/php/php7.3-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_intercept_errors off;
    fastcgi_buffer_size 16k;
    fastcgi_buffers 4 16k;
}

location ~ /\.ht {
    deny all;
}

}

as you can see both are using http.

logging of the invoiceninja.error.log

2021/01/07 13:29:13 [error] 16189#16189: *2352 FastCGI sent in stderr: “Primary script unknown” while reading response header from upstream, client: 192.168.122.1, server:" url-of-invoice", request: “GET /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.0”, upstream: “fastcgi://unix:/run/php/php7.3-fpm.sock:”, host: “192.168.122.107”