This repository contains codeigniter 3 souce code with added authentication using IonAuth and some typography plugins. I will list it later, but for my plan I will use this for demonstration:
- CodeIgniter 3.1.13 (PHP Framework)
- MySQL 8 (Database)
- Bootstrap 5 CSS Library
To prepare the LEMP stack, read this README.
- Clone this Repository
git clone <.git_address>
- Copy this repository into your server directory (
/var/www/ci3-auth-typography
).
see this file application/config/config.php.
$config['base_url'] = 'http://' . $_SERVER["HTTP_HOST"] . ':81';
As you can see above, the baseurl has been changed with php superglobal variable $_SERVER
.
- Create a new site configuration at
/etc/nginx/sites-available
server {
listen 81 default_server;
listen [::]:81 default_server;
root /var/www/ci3-auth-typography/;
index index.php index.html index.htm;
server_name _;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
- Create a softlink to the configuration at
/etc/nginx/sites-enabled
sudo ln -s /etc/nginx/sites-available/ci3-auth-typography /etc/nginx/sites-enabled/ci3-auth-typography
- Test the configuration
sudo nginx -t
- Restart your Nginx
sudo systemctl restart nginx
-
Run this SQL to create the database. ci3-ionauth-ckeditor
-
Set permission on these folders to be writable by the server:
- public/files/ckeditor/images
For deployment, please read these:
Copyright © 2023 ryumada. All Rights Reserved.
Licensed under the MIT license.