OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki


Individual Domain Name for Each Journal within ONE OJS inst.

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, jheckman, barbarah, btbell, bdgregg, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Re: Individual Domain Name for Each Journal within ONE OJS inst.

Postby renec » Fri Oct 17, 2008 6:07 pm

Hey Alec,

The URLs looked okay. They totally erased the /index.php from the URL. In other words, they look like the URLs on my perfectly working OJS installation (which is running a bit slow due to the rewrites, but I can probably clean it up a bit).
Perhaps part of this conversation should be moved to the OCS forum? I just realized that we are a bit off topic.
I will take a look at the Apache access logs, but what am I looking for? Also, mod_rewrite can be configured to develop its own log, as well as a variable level of logging.

Regards,
-Rene
renec
 
Posts: 24
Joined: Fri Jul 04, 2008 7:49 am
Location: Athens, Georgia

Re: Individual Domain Name for Each Journal within ONE OJS inst.

Postby asmecher » Sun Oct 19, 2008 9:56 am

Hi Rene,

Yes, please start a new topic over in the OCS forum and we'll pick it up from there. If you've found logging options for mod_rewrite, I'd suggest enabling them -- this will help immeasurably in debugging which part of the puzzle is not working.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 5747
Joined: Wed Aug 10, 2005 12:56 pm

Re: Individual Domain Name for Each Journal within ONE OJS inst.

Postby renec » Sun Oct 19, 2008 10:35 am

Hey Alec,

The OCS version has been posted here:
viewtopic.php?f=3&t=3651

-Rene Cieszewski
renec
 
Posts: 24
Joined: Fri Jul 04, 2008 7:49 am
Location: Athens, Georgia

Re: Individual Domain Name for Each Journal within ONE OJS inst.

Postby mbria » Tue Mar 10, 2009 9:47 am

Alec, let me say that your first answer to this post worth a "sticky". ;-)

I found your instructions clear and simple.
A really useful resource for those who like to personalize your multi-magazine OJS.

Thanks,

m.
mbria
 
Posts: 242
Joined: Wed Dec 14, 2005 4:15 am

Re: Individual Domain Name for Each Journal within ONE OJS inst.

Postby asmecher » Tue Mar 10, 2009 9:24 pm

Hi mbria,

Thanks, will do!

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 5747
Joined: Wed Aug 10, 2005 12:56 pm

Re: Individual Domain Name for Each Journal within ONE OJS inst.

Postby netfunda » Sat Aug 08, 2009 11:51 pm

I don't know how many people understood the above discussion and could actually implement "Individual Domain name for each journal within one OJS installation". I undertook following steps and one can actually setup the server in 10 mins:

1. Register additional multiple domain names and set up A record to point to your server where OJS is installed, say http://www.myjournalservice.com. (with and without www)

2. Go to myjournalservice.com admin and create additional journals with journal path MYJOURNAL1, MYJOURNAL2 etc. (we will use http://www.myjournal1.com & http://www.myjournal2.com to access these journals)

3. Edit your httpd.conf to add virtual hosts:

Code: Select all
<VirtualHost YOUR_IP_ADDRESS:80>
    ServerName myjournal1.com
    ServerAlias www.myjournal1.com
    DocumentRoot /home/MYJOURNALSERVICE/public_html
    ServerAdmin webmaster@myjournalservice.com
    ## User publizer # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup MYJOURNALSERVICE MYJOURNALSERVICE
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        SuexecUserGroup MYJOURNALSERVICE MYJOURNALSERVICE
    </IfModule>
    CustomLog /usr/local/apache/domlogs/myjournalservice.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    CustomLog /usr/local/apache/domlogs/myjournalservice.com combined
    Options -ExecCGI -Includes
</VirtualHost>

<VirtualHost YOUR_IP_ADDRESS:80>
    ServerName myjournal2.com
    ServerAlias www.myjournal2.com
    DocumentRoot /home/MYJOURNALSERVICE/public_html
    ServerAdmin webmaster@myjournalservice.com
    ## User publizer # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup MYJOURNALSERVICE MYJOURNALSERVICE
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        SuexecUserGroup MYJOURNALSERVICE MYJOURNALSERVICE
    </IfModule>
    CustomLog /usr/local/apache/domlogs/myjournalservice.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    CustomLog /usr/local/apache/domlogs/myjournalservice.com combined
    Options -ExecCGI -Includes
</VirtualHost>


Replace "MYJOURNALSERVICE" with the cPanel username of the account on which OJS is installed and set up the correct DocumentRoot above.

Restart Apache Web Server


4. Edit config.inc.php of the OJS and set base_url

Code: Select all
; The canonical URL to the OJS installation (excluding the trailing slash)
;base_url = "http://www.myjournalservice.com" (Leave this commented)

base_url[MYJOURNAL1] = http://myjournal1.com (do not use www)
base_url[MYJOURNAL2] = http://myjournal2.com


5. Edit .htaccess file for OJS and set the following content:

Code: Select all
RewriteEngine On
RewriteBase /

# Check for and remove "www" if necessary
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

# Use this set of 3 lines for each of your journals
RewriteCond %{SERVER_NAME} ^myjournal1.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/MYJOURNAL1/$1 [L]

# Use this set of 3 lines for each of your journals
RewriteCond %{SERVER_NAME} ^myjournal2.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/MYJOURNAL2/$1 [L]

# Use this set of 3 lines to allow access to the main site
RewriteCond %{SERVER_NAME} ^myjournalservice.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/index/$1 [L]




..and you are done :)

Please write to me at ssrahman@netfunda.com for further help.

Thanks,
Rahman
netfunda
 
Posts: 14
Joined: Tue Jul 28, 2009 8:42 am

Re: Individual Domain Name for Each Journal within ONE OJS inst.

Postby jamief » Mon Nov 16, 2009 2:07 am

Why do you need to work with ONE installation?

If you have 7 Journals, all from different fields, my gut feeling is in no case will there be ONE user ever needed in two journals (other than you!)

Why not make a single install, create a copy of that for each of the journals inside their respective domains, and create a corresponding mysql for each install.

7 Journals, 7 OJS installations. It might seem like a lot of work, but actually it isn't. And in the end, you have 7 separate dbases for the journals, giving you a set of smaller dbases, and LESS likelyhood of losing all seven journals if for some reason you have a mysql crash, corrupt session table, whatever.

Also doing mysql tinkering is much safer if you know which journal you are dealing with, and enter in that journal only. And for making CSV exports, you won't have to worry about which journal you are working with.

What is gained by one database? Administrator single sign-on. Anything else?
jamief
 
Posts: 137
Joined: Sun May 31, 2009 2:49 am

Re: Individual Domain Name for Each Journal within ONE OJS inst.

Postby Doki » Thu Oct 07, 2010 1:50 pm

We played with having both setups on our server (we have 4 journals now in our system and climbing). Our ultimate answer was to use one instance of OJS vice several instances for four reasons:

1.) We tend to have a lot of crossover traffic between our journals and having one master account made logical sense.
2.) The same gentleman manages all four journals.
3.) Mods/fixes/etc. made for one of our journals tend to apply to all of them.
4.) Version release day is much easier

Of the four, #1 was the decision maker.

FYI, reasons we considered having several versions:
1.) mod_rewrite is simplified (well, as much as it could be....)
2.) XML/Smarty Template mods are much easier to coordinate
3.) Personal preference: I like storing the data for each journal in separate databases. Makes analyzing/working with the data through mysql/phpmyadmin much easier.

My guess is that crossover traffic and managerial setup will ultimately decide whether you have one or several instances of OJS....

D
Doki
 
Posts: 22
Joined: Mon Sep 27, 2010 7:41 am
Location: Villanova University, Pennsylvania, USA

Re: Individual Domain Name for Each Journal within ONE OJS inst.

Postby swing » Fri Feb 11, 2011 5:32 am

Hello,

I am using OJS 2.3.4 and I have managed to configure everything correctly to use an individual domain for each journal -- I can access/view every journal as well as the site wide content using the appropriate domain but I can't log in and register at all and the search doesn't seem to function either :-( Has something changed in the meanwhile or am I doing something wrong?

Thanks!
swing
 
Posts: 80
Joined: Tue Oct 09, 2007 2:59 am

Individual Domain Name for Each Journal within MULTIPLE OJS

Postby mbria » Wed Apr 13, 2011 8:36 am

Hi fellows,

I don't know if I must open a different post or just follow the discussion here.
Alec, if you think is worth to open a new post, please, feel free to split this conversation.

I'm working on a new project at my university and we decided to go with one OJS per magazine.

We are working in some bash scripts to keep it simple, but now I'm stuck with RESTful urls.

The magazines' service will be the base URL (with a CMS on it) and each subdirectory will be a magazine with shared code (symbolic links) and specific config, htaccess, files and probably templeates.

So the structure will be:

http://service.mydomain.com --> cms
-- /magazine1 --> ojs-installation1
-- /magazine2 --> ojs-installation2

The point now is how to set up each .htaccess to redirect in the proper way.

I suppose the redirection need to be something like:
http://service.mydomain.com/magazine1/index --> http://service.mydomain.com/magazine1/i ... zine/index

As far as each magazine owns an OJS (and .htaccess) mod_rewrite need to be easy, but I'm unable to fix it.

Any comment, suggestion or RTFM to drive me in the right direction.

Cheers,
m.
mbria
 
Posts: 242
Joined: Wed Dec 14, 2005 4:15 am

Re: Individual Domain Name for Each Journal within ONE OJS inst.

Postby mbria » Mon May 23, 2011 9:16 am

Sorry to bump... but no comments about this?

Thanks a lot for your help,
m.
mbria
 
Posts: 242
Joined: Wed Dec 14, 2005 4:15 am

Re: Individual Domain Name for Each Journal within ONE OJS inst.

Postby asmecher » Fri May 27, 2011 10:42 am

Hi all,

See http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=7578 for more on this subject.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 5747
Joined: Wed Aug 10, 2005 12:56 pm

Previous

Return to OJS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests

cron