CodeIgniter Forums
Multiple Public Folders - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Multiple Public Folders (/showthread.php?tid=79915)



Multiple Public Folders - jsurp2001 - 08-13-2021

Is it possible to have multiple public folders with some sort of way to differentiate them to the database and stored files but they still use the 'app' folder?
Example:
Public_1 - Example.com
Public_2 - Sample.org
Public_3 - Website.net
Etc...
Any guidance would be greatly appreciated!


RE: Multiple Public Folders - InsiteFX - 08-14-2021

Please read:
CodeIgniter 4 User Guide - Running Multiple Applications with one CodeIgniter Installation


RE: Multiple Public Folders - jsurp2001 - 08-14-2021

(08-14-2021, 01:24 AM)InsiteFX Wrote: Please read:
CodeIgniter 4 User Guide - Running Multiple Applications with one CodeIgniter Installation

Hello,
Thank you for the response but this does not answer my question. I have read this in the past. This is geared toward running off the same system installation. No multiple public folders using the same same code and appearing as a different website.

Do you have any suggestions for that?


RE: Multiple Public Folders - John_Betong - 08-14-2021

@jsurp2001,

With Linux Ubuntu you could possibly omit the "www." domain name configuration alias and create a separate Virtual Host Directory:

Code:
<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName ci4-strict.tk
    # ServerAlias www.ci4-strict.tk
    DocumentRoot /var/www/ci4-strict.tk/public_html
    <Directory /var/www/ci4-strict.tk/public_html/>
       Options +FollowSymlinks
   </Directory>
</VirtualHost>

And using the Alias to point towards public-www
Code:
<VirtualHost *:80>
    ServerAdmin [email protected]
    # ServerName ci4-strict.tk
    # ServerAlias www.ci4-strict.tk
    ServerName www.ci4-strict.tk
    DocumentRoot /var/www/ci4-strict.tk/public_www
    <Directory /var/www/ci4-strict.tk/public_www/>
       Options +FollowSymlinks
   </Directory>
</VirtualHost>



RE: Multiple Public Folders - jsurp2001 - 08-14-2021

Thank you.