CodeIgniter Forums
Multiple applications server setup - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forum-9.html)
+--- Thread: Multiple applications server setup (/thread-73127.html)



Multiple applications server setup - aniketmagadum - 03-21-2019

Hello everyone,
        I have created a multiple applications inside of  codeingiter which share the common system folder by following the guide in Code Igniter documentation.
        The setup is as follows
         (I have removed the application and system folder outside the public_html as I have read it provides security)
         codeigniter/
              application/
                   project1/
                   project2 
              system/
              webroot/
                  index.php  -Points to project1 
                  project2.php  --Points to project2 

          I am able to call my applications in the following way 
  • example.com
  • example.com/project2.php
    Now the problem is that I want to setup these on a server as the following Urls.
  •  example.com
  • project2.example.com
    How can I achieve this ...I am a newbie to codeigniter..                        



RE: Multiple applications server setup - tp45 - 10-09-2019

if you are able to call it this way 
  • example.com

  • example.com/project2.php
    Then on server it should still be.
  •  example.com/project2
    if not then use two domains



RE: Multiple applications server setup - jreklund - 10-09-2019

You need a separate subfolder in your webroot to be able to load different sites based on domain.
webroot/
project1/index.php
project2/index.php