ivanpudic

Topic: multiple domain names as URL

hi,

you need to specify the jobberbase url in the config.envs.php file
if you enter www.domain.com/jobs it works

but if you have several multi-domain names like: domain1.com/jobs and domain2.com/jobs

it doesn't work, it only works on the domain name you have specified in the config.envs.php file

we could solve it with a redirect, but we would like to be able to make it work with other domains also

is it possible?

links

Re: multiple domain names as URL

Hi,

What you should do is add a block like this

Code:

$__instances['live'] = array(
    'prefix' => 'yourjobberbasedomain.com',
    'db_host' => 'localhost',
    'db_port' => 3306,
    'db_user' => 'root',
    'db_password' => '',
    'db_name' => 'jobberbase',
    'db_prefix' => '',
    'app_url' => 'http://www.yourjobberbasedomain.com/',
    'ini_error_reporting' => E_ALL,
    'ini_display_errors' => 'Off',
    'location' => 'online',
    'environment' => 'prod',
    'rewrite_mode' => 'apache_mod_rewrite'
);

in _config/config.envs.php for every domain you want to use JB on. You can add the blocks after the existing one. You have to change 'live' with 'live1', 'live2' or something else unique and then change the 'prefix'  and 'app_url' accordingly to every domain you want the site on.

Let us know if it works.

ivanpudic

Re: multiple domain names as URL

works like a charm smile
thanks for the help

HEMedia

Re: multiple domain names as URL

I am having a similar issue, but with sub-domains. The version I am working with is an older one, I adopted this job, and have no idea how they have it set up. This is set up on a Wordpress Mu installation with 6 sub-domains.

I have all the various $_instances blocks set up in the config.envs.php file and most of them work correctly. But when I try to add a new instance for a new sub-domain, it doesn't register and it bounces to an existing domain's job board. I have looked at all the .htaccess files and none are redirecting any of the sub-domains.

Here's the real kicker, there is a typo in the $_instances blocks already in place in some of the 'app_url' definitions (e.g. 'app_url' => 'http://colorado.mydomain.com/jobbboard/') - notice the extra 'b' in the directory folder name? It should be /jobboard/ but doesn't appear to be causing any problems.

Here is an example one of the working blocks:

Code:
$__instances['live4'] = array(
    'prefix' => 'colorado.',
    'db_host' => 'localhost',
    'db_port' => 3306,
    'db_user' => 'jobs1',
    'db_password' => 'Pass12345',
    'db_name' => 'jobs_colo',
    'db_prefix' => '',
    'app_url' => 'http://colorado.mydomain.com/jobbboard/',
    'ini_error_reporting' => E_ALL,
    'ini_display_errors' => 'On',
    'location' => 'online',
    'environment' => 'prod',
    'rewrite_mode' => 'apache_mod_rewrite'
);

Now, I am aware that the 'prefix' definition should the the root domain, correct? (e.g. mydomain.com) However, for most all of the working blocks, this is how the 'prefix' is defined. There is one block that has the full domain, including the sub-domain, defined in the prefix and it is working as well. (e.g. nc.mydomain.com)

So, needless to say, I am befuddled and confused. Any suggestions?

hobo

Re: multiple domain names as URL

Are you sure you are changing files in the correct folder?
Does messing with other settings break the site?

HEMedia

Re: multiple domain names as URL

hobo wrote:

Are you sure you are changing files in the correct folder?

I am changing the correct file and figured out the answer to my question. For some reason, if I keep the instance I have labeled 'live' at the end of the list, all other instances before it work correctly. Since I had initially added new instances to my config.envs.php file after the 'live' instance, they weren't being picked up. I was also able to determine that the version being used is version 1.8 for anybody else's reference.

Is this a bug or intended?   

hobo wrote:

Does messing with other settings break the site?

Ironically, correcting the typo did not break the site. Everything remained the same and works as before. Having different 'prefix' names didn't seem to affect it either. Strange!