CodeIgniter Forums
hosting codeigniter project to linux server - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: hosting codeigniter project to linux server (/showthread.php?tid=75442)



hosting codeigniter project to linux server - bealefay - 02-06-2020

I want to host my CodeIgniter project to Linux server using apache2
I already install apache2 using 

Code:
sudo apt install apache2
I already to copy my project in 

Code:
/var/www/
 and i already set in 

Code:
/etc/apache2/sites-available/000-default.conf
 but when I'm open in the browser, the page show 

Code:
index.html
 apache2 it works!
I tried using new conf in 

Code:
/etc/apache2/sites-available/
 but it can't work for me
how I can change that default page to my CodeIgniter project?


RE: hosting codeigniter project to linux server - littlej - 02-06-2020

Hello bealefay ! The issue is not coming from CI, it is your apache configuration.

1/ You need to make sure PHP is installed. You can type "php -v" in the Terminal to make sure it is ok.
https://linuxize.com/post/how-to-install-php-on-ubuntu-18-04/

2/ "000-default.conf" needs to point to the "public" folder, not the root folder ("<Directory /path/to/public>"). I suggest you set up a virtualhost.
https://linuxize.com/post/how-to-set-up-apache-virtual-hosts-on-ubuntu-18-04/

3/ "000-default.conf" needs to load "index.php", not "index.html".
https://stackoverflow.com/questions/16192049/how-to-make-apache-serve-index-php-instead-of-index-html


RE: hosting codeigniter project to linux server - robertadixon - 02-07-2020

Hope your post will be helpful to install my web hosting services.