Continuing the discussion from Links to invoices:
I can’t seem to get this working with the selfhosted version, been at it for a while now but no dice.
Spun up a invoiceninja VPS from the marketplace at digitalocean to try it out but it didn’t work there. Tried a manual install from scratch on a LEMP stack on Ubuntu (followed the guide linked in the docs) but also couldn’t get it working.
Here’s the nginx server block:
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name mydomain.com;
client_max_body_size 20M;
root /var/www/ninja/public;
gzip on;
gzip_types application/javascript application/x-javascript text/javascript text/plain application/xml application/json;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;
index index.php index.html index.htm;
ssl_certificate "/etc/letsencrypt/live/mydomain.com/fullchain.pem";
ssl_certificate_key "/etc/letsencrypt/live/mydomain.com/privkey.pem";
ssl_session_timeout 10m;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php?q= last;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php8.1-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;
}
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/ininja.access.log;
error_log /var/log/nginx/ininja.error.log;
sendfile off;
}
server {
listen 80;
server_name mydomain.com;
add_header Strict-Transport-Security max-age=2592000;
rewrite ^ https://$server_name$request_uri? permanent;
}
Looking at the demo online at react.invoicing.co it works great, just want to confirm URL navigation is also possible with the selfhosted install as well?
Coming from a v4 install I have had for many years and URLs are a massive part of my workflow, hope I can get it working.
I appreciate any help!