Welcome Guest, Not a member yet? Register   Sign In
Seperate CI Websites One Shared Host?
#1

(This post was last modified: 11-03-2019, 08:58 PM by ciadmin.)

Hi guys, first post here. I've purchased the shared hosting plan from **REDACTED** for the year, and it lets me host up to 3 websites. I have the first one working great (after a LOT of fuss), but now I would like to host another SEPERATE CI website. Heres my thought on directory structure:

/public_html
-application
-server
-user_guides
-etc
-domain2.com
-application
-server
-etc


Has anyone tried this before? With what luck? The way the hosting works is that I have to point the additional domain to somewhere in the public_html folder. I'd assume I'd just have to change the config.php base_url to 'http://domain2.com/' right? Or would I have to make it 'http://domain1.com/domain2.com/' . In theory this should all work out, but I'm getting 404s.


Doan
Reply
#2

(This post was last modified: 11-04-2019, 11:44 AM by fernaog.)

The structure of the files you show is correct. The only thing you need is to go to the configuration of domains in your hosting panel and point the domain domain2.com to the domain2.com folder

You can remove the user_guides folder since they are only the documentation files.

The config.php base_url must be 'http://domain2.com/'
Reply
#3

I have ran two web sites on my hosting using a sub-domain with no problems.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

@doanpha11

I run over a dozen sites from a VPS and have a similar structure except a /ci2 folder "above the root.".

All common libraries and CodeIgniter versions are grouped within the /ci2 folder. The server path accessed by setting the $server_path = '../ci2/CodeIgniter-version/..."; which makes it easy to only have a single occurrence of the CodeIgniter Framework versions and easy to roll-back to a previous version.

I would recommend using a "Freenom.com" free domain for your third website because it is ideal for testing - I use about a dozen Smile
Reply




Theme © iAndrew 2016 - Forum software by © MyBB