Location of new (Sub-) System [message #7588] |
Mon, 26 April 2021 05:12 ![Go to next message Go to next message](/theme/default/images/down.png) |
htManager
Messages: 427 Registered: May 2014
|
Senior Member |
|
|
Hi Toni,
I want to create a new application and I am not sure how to handle this best. I have one application under www.htmanager.de. Now I want to create a new System/Subsystem under www.hartz.biz. Can I integrate this system as subsystem in my existing environment? Even if it is in a different domain? As far as I understand your system, the prefix is relevant to distinguish and I only have to get connection to the databases, isn't it?
If yes, do I have to consider something special in the config file?
|
|
|
Re: Location of new (Sub-) System [message #7589 is a reply to message #7588] |
Tue, 27 April 2021 04:44 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Are the two domains (www.htmanager.de and www.hartz.biz) being run on the same server with the same DOCROOT? Is this second subsystem going to be available on the same menu system as the first subsystem? Is the first (existing) subsystem going to be only available on www.htmanager.de and the second (new) subsystem only available on www.hartz.biz?
It is possible to have both domains running in the same DOCROOT but still treated as different entities with different databases. In your config.inc file you can detect which domain is being accessed by looking at $_SERVER['SERVER_NAME'], then you can set the credentials you need, including the database prefix, for that particular domain. I do this all the time on my development PC where I have a different set of databases for each client that I support, but they all share the same code base.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
Re: Location of new (Sub-) System [message #7590 is a reply to message #7589] |
Tue, 27 April 2021 09:58 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
htManager
Messages: 427 Registered: May 2014
|
Senior Member |
|
|
Yes, both the two domains and the includes directory are located under the DOCROOT.
Yes, both subsystems are going to be available only on their servers.
I have seen the section in the config.inc where you can detect which domain is being accessed by looking at $_SERVER['SERVER_NAME'] and now I think that I understand the way to handle this.
I have a total of five databases on my server: audit, menu and dict for radicore system needs and htm and him for my applications.
At the moment the radicore directory with all the radicore subdirectories (audit, css, default, dict,... and the application subdirectory) with the classes, reports, screens, ... subdirectories are under www.htmanager.de. Is this what you mean with code base?
If yes, do I have to copy these directories in the directory structure of the second server or will this be handled by the config file? Or would it be even better to hold these directories/files directly under DOCROOT as the includes directory?
If I know the right way I can try to find my right settings.
|
|
|
Re: Location of new (Sub-) System [message #7591 is a reply to message #7590] |
Wed, 28 April 2021 03:28 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
On the same server you can have more than one domain name pointing to the same DOCROOT (document root) directory as each domain has a separate entry in the Apache config file. On my development PC this is achieved using the VirtualHost directives where each domain shares the same DOCROOT, which would probably be the directory where all the Radicore files reside. This means that several domains can share the same codebase, but although they also share the same config.inc file you can use different settings for each domain. In my case I have a separate set of databases, including the MENU database, for each domain as I use a different $dbprefix for each. In this way you can have a single codebase shared by multiple domains, but each domain can use its own databases.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: Location of new (Sub-) System [message #7593 is a reply to message #7592] |
Thu, 29 April 2021 03:54 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
In all my installations I have the Radicore subsystem directories and all application subsystem directories under the same root folder, which may be called 'radicore' but can be anything you choose. If several domains are sharing the same code then each domain must have its DOCROOT set to the root folder mentioned above. This means that each domain will share the same files, including the config.inc file. This means that by default each domain will also share the same databases. You can alter this by setting different values in the config.inc file according to the current domain name, which is provided in $_SERVER['SERVER_NAME']. You can then use a different value for $dbprefix, such as 'htm_' and 'him_' so that the data for one domain is NOT shared with any other domain.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: Location of new (Sub-) System [message #7595 is a reply to message #7594] |
Fri, 30 April 2021 03:14 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
If your domains are running on different servers then you must have a separate set of files on each server as it is not possible to share a directory on one server with an application running on a different server.
If the different domains are running on the same server then you need to tell Apache that each domain has the same document root. You can either do this by amending the httpd.conf file, but if this is not possible then you can use an htaccess file.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
Re: Location of new (Sub-) System [message #7596 is a reply to message #7594] |
Sat, 01 May 2021 04:56 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
I don't know what facilities your hosting company provides, but mine supplies a control application called cPanel. I have several domains which are hosted on the same server, and cPanel provides me with the mechanism to specify the document root for each one. The default document root is "/public_html", but for one of them called "forum.radicore.org" I changed it to "/public_html/fud307". Easy Peasy Lemon Squeezy.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: Location of new (Sub-) System [message #7598 is a reply to message #7597] |
Mon, 03 May 2021 04:20 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
By having the same document root for both domains you can share a single installation of the Radicore files in your file system. Both of your subsystems could also reside under the same document root. If you had a single set of database for both domains then both domains would be visible in the menu tabs and would therefore be accessible. If you had a separate set of databases for each domain, by modifying the config.inc file as I explained previously, then each domain would have its own menu database and could only access the subsystem(s) which were loaded into that copy of the menu database.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: Location of new (Sub-) System [message #7600 is a reply to message #7599] |
Tue, 04 May 2021 04:15 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
If your Joomla! sites are running on different physical servers with separate sets of files, and they each require their own copy of Radicore then it would be very difficult, if not impossible, to have a single set of Radicore files which could be shared by each site. Just as each site has its own set of Joomla! files which must be maintained separately, then each site must have its own set of Radicore files which must be maintained separately.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
Re: Location of new (Sub-) System [message #7601 is a reply to message #7600] |
Wed, 05 May 2021 03:34 ![Go to previous message Go to previous message](/theme/default/images/up.png) |
htManager
Messages: 427 Registered: May 2014
|
Senior Member |
|
|
I installed the Radicore application in the tree structure of the second joomla! installation. It was very easy. I was afraid that I would have more problems. But with your suggested changes in the config.inc, the different apps are running without problems. As I installed the Radicore application the first time, years ago, I had much more problems. Now, everything is fine. Thank you.
|
|
|