Welcome Guest, Not a member yet? Register   Sign In
Ci4 Install without vhosts
#6

(This post was last modified: 06-14-2020, 07:30 AM by 68thorby68.)

Thanks, that is certainly an option I will look at.

But for the time being I have done as suggested, and in case anyone else needs this I'll put it in long hand.

I manually installed CI4 in the server root (i.e. using FTP copied all unzipped files to server root).
Renamed server foler \public_html to \public_html_bak
Renamed the newly created \public to \public_html
in \app\config\App.php edited $baseURL = 'https://mydomain/';

I then uploaded (FTP) the controllers, models and views from my local machine to the appropriate server folder (\app\Controllers\, \app\models\, \app\views\).

As I use bootstrap 4 and a local copy of fontawesome I found that on my local machine the best place to house these is in a subfolder of public, assets. So I uploaded (FTP) the assets folder to \public_html\assets\

I configured my database \app\config\Databases.php

and tested.

in browser https://mydomain.co.uk displays the welcome page (as expected)
in browser https://mydomain.co.uk/user/login displays the expected login page (derived from \app\controllers\user\login,php, \app\models\user\login.php and \app\views\user\login.php) formatted and styled with the expected css and fontawesome derived from \public_html\assets\...

As of yet, I have not executed any fancy routing, redirects or invoked any session mgmnt but am hopeful I wont run into any issues with this install.

Thank you so much for your help and assiatance.

Could I also suggest that you suggeted set up this is added to the documentation?

"Where the option of setting up a virtual host is not an option (i.e. some shared hosting), Shared hosting providers can use one of several different setups. What you do depends on what the provider's setup allows. It comes down to whether they allow you to upload to the same level as where they have put the folder that mydomain.com is served from.

Let's say mydomain.com is served out of a folder at /some/path/to/public_html/ and that last folder (public_html) is where they say you should, "put your website files here." The public_html folder might have some other name, but for this explanation we will use public_html as a placeholder for whatever the provider used. Typically, but not always, that folder won't have anything in it you really need and can be deleted. But unless it is empty do not do that just yet. Instead, change the name to public_html_bak. Then install (or upload) CodeIgniter at /some/path/to/. Then change the name of the folder public that CodeIgnier created to public_html.

In \Config\App

PHP Code:
$baseURL = 'https://mydomain.com';

You may also want to consider using a virtual machine (VM) instead of exposing a work in progress to the whole wide world? You can set up the VM to exactly match the OS and app stack your eventual hosting provider uses. There are several free VMs available such as VirtualBox and VMware Workstation Player."

Currently the documentation reads:
"Manual Installation

The CodeIgniter 4 framework repository holds the released versions of the framework. It is intended for developers who do not wish to use Composer.

Develop your app inside the app folder, and the public folder will be your public-facing document root. Do not change anything inside the system folder!

Note: This is the installation technique closest to that described for CodeIgniter 3.
Installation

Download the latest version, and extract it to become your project root.
Setting Up

None"

Just a thought.

Again many thanks for your help.
Reply


Messages In This Thread
Ci4 Install without vhosts - by 68thorby68 - 06-14-2020, 04:47 AM
RE: Ci4 Install without vhosts - by dave friend - 06-14-2020, 06:22 AM
RE: Ci4 Install without vhosts - by 68thorby68 - 06-14-2020, 06:31 AM
RE: Ci4 Install without vhosts - by dave friend - 06-14-2020, 06:33 AM
RE: Ci4 Install without vhosts - by jreklund - 06-14-2020, 06:50 AM
RE: Ci4 Install without vhosts - by 68thorby68 - 06-14-2020, 07:02 AM
RE: Ci4 Install without vhosts - by InsiteFX - 06-15-2020, 02:59 AM
RE: Ci4 Install without vhosts - by jreklund - 06-15-2020, 10:23 AM
RE: Ci4 Install without vhosts - by 68thorby68 - 06-15-2020, 11:20 AM
RE: Ci4 Install without vhosts - by jreklund - 06-15-2020, 12:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB