set the "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: set the "document root" to the public folder inside your project (/showthread.php?tid=68469) Pages:
1
2
|
RE: set the "document root" to the public folder inside your project - ciadmin - 07-15-2017 Hmmm - Apache has a public_html or an htdocs folder, but a CI project should go *inside* that, eg. at public_html/myproject or htdocs/myproject. The document root for your website would then be set to "public_html/myproject/public" or "htdocs/myproject/public", either in httpd.conf (if this is the only webapp you are running) or inside extra/httpd-vhosts.conf (if using virtual hosts). That's what I do RE: set the "document root" to the public folder inside your project - John_Betong - 07-15-2017 (07-15-2017, 09:38 AM)ciadmin Wrote: Hmmm - Apache has a public_html or an htdocs folder, but a CI project should go *inside* that, eg. at public_html/myproject or htdocs/myproject. The document root for your website would then be set to "public_html/myproject/public" or "htdocs/myproject/public", either in httpd.conf (if this is the only webapp you are running) or inside extra/httpd-vhosts.conf (if using virtual hosts). I use vhosts and the one set for john-betong.tk has these settings: Code: <VirtualHost *:80> [br] file: https:/john-betong.tk/index.php PHP Code: <?php Is there a security problem with the above setup? Edit: >>> either in httpd.conf (if this is the only webapp you are running) or inside extra/httpd-vhosts.conf (if using virtual hosts). I have 10 sites running and they can all access the /XXX/YYY/ZZZ/ci2/CodeIgniter4/system/ directory. RE: set the "document root" to the public folder inside your project - Edel - 07-16-2017 The problems is with wamp server 64bits definitely. I tried installing codeigniter 4 on windows 7 32 bits with appserv satisfactorily. Just I need to create a virtual host as CodeIgniter4 User Guide explains beacause I have other projects in my DocumentRoot. RE: set the "document root" to the public folder inside your project - InsiteFX - 07-18-2017 This is the Virtual Host that I use on Windows 10 Pro using XAMPP and PHP 7.1.7. PHP Code: # Testing CI 4.0 Dev Also on Windows you may need to add the server name to the Windows host file. c:\Windows\System32\drivers\etc\hosts You can open it using notepad with administrator mode. Example: 127.0.0.1 ci4.dev or ::1 ci4.dev This works fine for me and I use it all the time. |