Base_url and multiple installation

Hi,

is it possible to have multiple installations but the same base url?
Something like:

www.myjournals.com/aaa1
www.myjournals.com/aaa2
www.myjournals.com/bbb1
www.myjournals.com/bbb2

where the a-journals and the b-journals are in separate OJS installations but share the base_url?

Regards,
habib

No, afaik this is not possible.

Hi @habib,

The mod_rewrite toolset (for Apache, or equivalent for other servers) can accomplish this.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

I could achieve this with something like

AliasMatch (./aaa1/.) “/srv/www/aaa1_dir/htdocs/$1”
<Directory “/srv/www/aaa1_dir/htdocs”>

(did same with another journal in a different directory.)

But that did’nt work in the backend (no upper menu).
Maybe it’s not such a good idea after all…

Regards,
habib

Hi @habib,

You’ll also need to use the base_url[...] settings in config.inc.php to get OJS to generate the correct URLs internally.

Regards,
Alec Smecher
Public Knowledge Project Team

Yeah, but this is weird… then the base_url’s would always be the same:

base_url = “https://www.myjournals.com/

base_url[aaa1] = “https://www.myjournals.com/
base_url[aaa2] = “https://www.myjournals.com/

and similar in another config.inc.php in my other installation.
…because I wanted all journals (in different installations, residing in different directories) to have the same base_url. I wanted them to be like

www.myjournals.com/index.php/aaa1
www.myjournals.com/index.php/aaa2
www.myjournals.com/index.php/bbb1
www.myjournals.com/index.php/bbb2

(with or without the index.php)
I guess that doesn’t work. Also, of course, the AliasMatch shouldn’t occur somewhere else in the url, but that’s another thing.

Hi @habib,

The base_url[...] settings tell OJS how to generate outgoing URLs. I’d suggest experimenting with these settings first, without mod_rewrite, and reloading the OJS page to see whether the URLs are being generated as you want. (Of course, the links won’t actually work until the configuration is complete.) Then, once those are satisfactory, try your mod_rewrite config.

Note that I haven’t tried a configuration like the one you’re proposing, but off the top of my head, I don’t think it’s impossible.

Regards,
Alec Smecher
Public Knowledge Project Team

I have this error: Failed opening required ‘classes/core/Application.inc.php’ (include_path=’.:/home4/neredataltic/public_html/classes:/home4/neredataltic/public_html/pages:/home4/neredataltic/public_html/lib/pkp:/home4/neredataltic/public_html/lib/pkp/classes:/home4/neredataltic/public_html/lib/pkp/pages:/home4/neredataltic/public_html/lib/pkp/lib/adodb:/home4/neredataltic/public_html/lib/pkp/lib/phputf8:/home4/neredataltic/public_html/lib/pkp/lib/pqp/classes:/home4/neredataltic/public_html/lib/pkp/lib/smarty:.:/opt/php56/lib/php’) in /home4/neredataltic/public_html/lib/pkp/includes/functions.inc.php on line 30

How I should set the base_url to fix it?

Hi @OJSUSER11,

I don’t think this is related to the base_url setting. Can you post this as a new topic?

Regards,
Alec Smecher
Public Knowledge Project Team