![]() # rm /etc/nginx/sites-enabled/defaultĬreate the text configuration file for a new vhost in the sites-available folder, best practice if you host multiple websites or webapps from a single server. When left unconfigured, this page presents some security loopholes. The default NGINX install on Ubuntu has a pesky default website located at /etc/nginx/sites-enabled/default - and for our cases, we do not want this default website hosted by nginx. # openssl req -new -x509 -days 365 -nodes -out /etc/nginx/cert/ninja.crt -keyout /etc/nginx/cert/ninja.key So for the purposes of this guide, the NGINX configuration will use an instant OpenSSL certificate that is not particularly trusted on the Internet. I am not going to provide a guide to setup letsencrypt. Most of you would be using letsencrypt, or some other CA. I am about to show you NGINX configuration file that points to an example based openssl cert. Third: Configure NGINX FOR TESTING - NOT for Production use - OpenSSL certification > grant all privileges on invoicedb.* to. The database name will be used by InvoiceNinja during the server setup after installation is complete, as well as the username and password you specify here, in order for InvoiceNinja to login to the SQL database with read/write permission. We will create a database with any arbitrary name ‘ninjadb’ in this example, and create arbitrary username and password combination ‘ninja’ and ‘ninjapass’. These commands will directly access the SQL database through the services provided by mariadb. # mysql_secure_installationĮnter current password for root (enter for none): Remember Make sure to change your SQL root password, and save that password somewhere safe and secure, to protect access to the databases. This command will take you through a guided wizard to initialize the SQL database. ![]() ![]() Start, and enable services for mariadb, the program/service that manages your SQL database and the incoming and outgoing communication it has with other applications like Invoice Ninja. # apt install mariadb-server mariadb-client nginx vim # apt install php8.1-bcmath php8.1-gmp php8.1-fileinfo \ We can also install MariaDB for SQL service, NGINX will be used for webhosting in my tutorial, and vim as tools for later steps. Invoice Ninja is built on PHP 8.1, so we must first install that, and the recommended extensions for it. This guide and the commands below assume you are running a root user shell with sudo bash.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |