set the "document root" to the public folder inside your project |
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 ![]()
07-15-2017, 10:26 AM
(This post was last modified: 07-15-2017, 10:38 AM by John_Betong. Edit Reason: Added Edit ) (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.
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.
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. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |