Skip to content

Instantly share code, notes, and snippets.

@rcorsari
rcorsari / codeigniter4-multiple-databases.md
Last active January 28, 2024 13:40
Use Multiple Databases in Codeigniter 4

How to use multiple Databases in a Codeigniter4 app

first we edit the .env file with

# DEFAULT connection group
database.default.hostname = localhost
database.default.database = codeigniter_db1
database.default.username = myuser
database.default.password = Myuser@123
@rcorsari
rcorsari / add-codeigniter-app-apache2-linux.md
Last active January 27, 2024 21:54
How To Add Codeigniter App Site to Apache2 2.4.x on linux

Add Codeigniter app site to Apache2 web server on Ubuntu

(tested on Ubuntu 22.04 and Apache 2.4.52)

PREMISES:

  • here the website is a PHP framework app called appname which has a /appname/public folder which is the one to browse
  • I want also a virtual host appaname.box which later will allow to browse to http://appname.box
  • It will listen on port 80

1. Add site configration

  • Go to /etc/apache2/sites-available