Reputation: 2421
i have trouble understanding this line on CI's installation instruction, what does web root excatly mean? it says that for better security, system and application should be above web root, does this mean that, like in a web host, this should be above public_html? or inside public_html? e.g public_html/system and public_html/application.. or in the case of a local server like XAMPP, inside htdocs? like htdocs/system and htdocs/application? i am really confused when it says above web root. cuz if i think of it, it will be outside public_html or outside htdocs. Please do enlighten me
Upvotes: 0
Views: 1914
Reputation: 5084
no, above public_html,
So if /home/lemoncodes/public_html is your WWW folder, you should put your files in: /home/lemoncodes.
Upvotes: 0
Reputation: 18685
Webserver with single website: The files should go wherever your server tells you the web root is, in most server scenarios this is public_html so as Arthur Barros illustrated.
Webserver with multiple sites: In this scenario the common way of doing things is for each site to have it's own folder inside of public_html. In this case the web server is set up for each domain to have it's own folder, so that domains folder becomes the web root. So as below
public_html
...WebSite1
...WebSite2
......Application
......System
...WebSite3
XAMPP: I strongly suggest setting up CI in XAMPP the way I explained you would set it up in a webserver with multiple sites. While it technically would work in the htdocs folder directly it's not a good idea in my opinion. Create a folder inside htdocs for your site then access it via that folder in the web browers.
htdocs
...myWebsite
......Application
......System
http://localhost/myWebsite would be your base url.
Even on a web host with a single website it still makes sense to contain CI in it's own folder, the adjust your htaccess, config and routing files to point to that folder. So your site could actually reside in www.example.com/my_website but you set up your files so you would point to www.example.com or www.example.com/contact.
This just keeps things compartmentalized, and allows you to install other things, other CI applications etc on the server without conflicting with your original install.
Upvotes: 0
Reputation: 15045
. /
.. /
public_ftp /
public_html /
application /
system /
This will put application
and system
ABOVE the webroot which is public_html
Upvotes: 1
Reputation: 4806
In web server the root is public_html/system and public_html/application that means the public_html refers to the your domain name .
In local htdocs/domain/system and htdocs/domain/applications
Upvotes: 0
Reputation: 80
If you consider that the representation of a directory and sub-directories is a tree, we will soon see that it refers to the following:
. /
.. /
public_ftp /
public_html /
| - Application /
| - System /
etc.
Soon Aplicattion and System folder should be inside public_html.
Upvotes: 0