Invoice Ninka 403

Hi, My Invoice ninja v4 is having this problem:

Forbidden

You don’t have permission to access this resource.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Hi,

Has anything changed on the server?

I don’t think so, same server configuration.

Are there any details about the error in the web server error logs?

It looks like something has deleted the .env file!

I still have all the invoices in the database. Can I replace or create a new .env without deleting the invoices?

Yes but you may see some errors if the APP_KEY is changed.

This are the server errors:
[Wed Feb 09 15:45:45.693473 2022] [autoindex:error] [pid 7284:tid 22891116975872] [client 109.111.122.9:65253] AH01276: Cannot serve directory /home/sectionmarketing/public_html/facturacion/: No matching DirectoryIndex (index.php,index.php5,index.php4,index.php3,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.jp,index.phtml,index.shtml,index.xhtml,index.html,index.htm,index.wml,Default.html,Default.htm,default.html,default.htm,home.html,home.htm,index.js) found, and server-generated directory index forbidden by Options directive

I don’t mind as long as I can download the invoices. I’m currently using other version of invoiceninja v5 on another domain

I don’t think that error is related to the .env file.

You may want to setup a clean v4 install and copy over the database using mysqldump

Should I copy the full db? The app is not updated to latest version

Yes, you’d want to use mysqldump to copy the entire database.