CodeIgniter 4 on VestaCP - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31) +--- Thread: CodeIgniter 4 on VestaCP (/showthread.php?tid=77778) |
CodeIgniter 4 on VestaCP - someone - 10-17-2020 Hi everyone! I use VestaCP to serve my websites. I'm using nginx and php-fpm using socket. Anyway when you use CI3 template, your CI4 project won't work. To solve this problem copy your CI3 project templates and change uri location. I use Centos7; 1-) Go to templates location Code: cd /usr/local/vesta/data/templates/web/nginx/php-fpm 2-) copy codeigniter3.tpl and codeigniter4.stpl Code: cp codeigniter3.tpl codeigniter4.tpl 3-) Edit ci 4 templates like that; codeigniter4.tpl and codeigniter4.stpl Code: server { and find the htaccess|httpasswd in the same file; PHP Code: location ~* "/\.(htaccess|htpasswd|env)$" { We added env after htpasswd. Because dotenv file shouldn't be downloadable. 4-) Rebuild your web 5-) Change your template in your project That's all. I hope this will help you. |