CodeIgniter Forums
You need to set your "document root" to the public folder inside your project. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: You need to set your "document root" to the public folder inside your project. (/showthread.php?tid=70115)



You need to set your "document root" to the public folder inside your project. - enverehan - 02-22-2018

Hello

I installed Code Igniter on XAMPP PHP 7.2.2. But I see this message

Code:
If you see this message, you have not configured your web server properly.

You need to set your "document root" to the public folder inside your project. This could be your default setting, or that of a virtual host, depending on how you set up your local development environment.
I installed virtual server on XAMPP and I configured the config php file but nevertheless I see this message.
Have you got any idea about this problem?


RE: You need to set your "document root" to the public folder inside your project. - ciadmin - 02-22-2018

Like the message says, you will need to set your document root inside Apache's httpd.conf

Code:
DocumentRoot "/opt/lampp/apache2/htdocs/YOURPROJECT/public"
<Directory "/opt/lampp/apache2/htdocs/YOURPROJECT/public">
...

or you will need to set the document root of your virtual host inside Apache's conf/extra/httpd-vhosts.conf

Code:
<VirtualHost *:80>
   DocumentRoot "YOURPROJECTROOT/public"
   ServerName yourproject.local
   ErrorLog "logs/yourproject-error_log"
   CustomLog "logs/yourproject-access_log" common
</VirtualHost>



RE: You need to set your "document root" to the public folder inside your project. - enverehan - 02-22-2018

Thanks. Problem was solved!

Thanks