• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
directory structure CI4

#1
So the index.php in CI4 has been moved to public. For development its not that great a big deal to set up virtual hosts in /etc/httpd/httpd.conf and tweak /etc/hosts

However on hosting its not uncommon to have several directories in your hosting account and basically when domain points to a directory say nextbigthing  then when somebody puts url nextbigthing.org  it points to directory nextbigthing and server is looking for some index.html or in a php framework a bootstrap index.php

So the only thing i can think of if i upload CI4.zip to my server  for a project is   to use some form of re-direct from Cpanel so that a live url  for nextbigthing.org actually will get pointed to the public dir of codeigniter dir structure of project.

Is that the way it is envisaged things  will be done or maybe use a  .htaccess in  root of web project ?
Reply

#2
I use cpanel/whm for my VPS servers, and the only domain that is awkward to handle is the main domain associated with an account, which maps to public_html. All of the other addon domains or subdomains can be mapped to a public folder inside an appropriate project root.
Reply

#3
(10-22-2019, 06:29 AM)ciadmin Wrote: I use cpanel/whm for my VPS servers, and the only domain that is awkward to handle is the main domain associated with an account, which maps to public_html. All of the other addon domains or subdomains can be mapped to a public folder inside an appropriate project root.

yes thats what i've got about 5 addon domains inside one main hosting account ; so basically you concur then that thats the best way to do it ; map url  to addon domain to public dir.

It looks like CI4 is not production ready yet; i won't be using it until i re-learn it, last time used was when  ellislab was lead dev.
Reply

#4
@captain-sensible

I used to use sub-domains but far prefer to use a free domain, Freenom.com has numerous available...

With only having a single domain it can easily get confusing... registering a free domain and using the new domain as a staging server until it is ready to be permanent is far easier than using a sub-domain.
download and make your system directory strict
Reply

#5
Last time I checked, all major PHP frameworks used a public folder now for security reasons. A quick search for installing Laravel on CPanel brought up this post that talks about the changes needed for addon and primary domains.
Support Development  • Practical CodeIgniter 3  • Vulcan - CLI Tools for CI4
Reply

#6
(10-22-2019, 10:02 AM)kilishan Wrote: Last time I checked, all major PHP frameworks used a public folder now for security reasons. A quick search for installing Laravel on CPanel  brought up this post that talks about the changes needed for addon and primary domains.
yes thats the facility i have on my hosting via cpanel , i 've seen it but never used it before ,but obviously will have to in future.

For now i have CI4 set up and working (apache on Slackware) via  localhost - virtual host in /etc/httpd/httpd.conf and an added entry on /etc/hosts .That will do for now , since its going to be a return to learning curve for CI
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.