Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8292145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:22:24+00:00 2026-06-08T13:22:24+00:00

My goal is to have 1 centralized place for the Application + DB and

  • 0

My goal is to have 1 centralized place for the Application + DB and all the domains will serve pages from that place (without copying all the files)

My goal is to eliminate the need to copy my app to 5 different domains, and everythime there is a new feature an update 5 is needed on 5 different places.

I checked this: accessing files across domains that are hosted on the same server, but it didnt help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T13:22:27+00:00Added an answer on June 8, 2026 at 1:22 pm

    as long as the domains are on the same physical server this can be accomplished.

    Your code will reside outside the web root:

    • domain1
    • domain2
    • domain3
    • domain4
    • domain5
    • common_yii
      • framework ( the yii framework files )
      • appDir ( your web app files go here )
        • protected
          • config ( your app config file ‘main.php’ should be here )

    your index.php in each of the domains should look something like this:

    // change the following paths if necessary
    $yii = '../common_yii/framework/yii.php';
    $config = '../common_yii/appDir/protected/config/main.php';
    
    
    // remove the following lines when in production mode
    defined('YII_DEBUG') or define('YII_DEBUG',true);
    // specify how many levels of call stack should be shown in each log message
    defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
    
    require_once($yii);
    if ( !isset( Yii::app()->params ) ) {
        Yii::createWebApplication($config)->run();
    }
    

    you will be able to set instance specific variables in the index.php for each domain.

    HTH

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Goal I have a WPF application that contain text inside a DataGrid . I
My goal is to have more themes for my application and if possible, bundle
The goal is to have an array where all strings are of length n.
Here's my goal : I have a Windows XP PC with all the source
Main goal: To have two builds of the same application on my phone. What
My goal is to have action icons in lists that correspond to how the
I am creating domain model. I have Goal ( something that user wants to
The goal is to have a single-threaded event-driven framework. The end-user will do something
Original goal: I have a TreeMenu that i use to display my Menu. In
Goal: have a single assembler source file which will assemble both to x86 (i386)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.