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, btbell, michael, bdgregg, barbarah, 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 i

Postby asmecher » Fri Jul 26, 2013 4:23 pm

Hi Anna,

Have you configured your installation to redirect to your single journal? (This is an option on the Site Settings page.) If you have, then base_url[index] will not be what you're looking for -- it'll be base_url[journalPath], where "journalPath" is the journal path from the Site Administrator's settings page for that journal.

Incidentally, it's not entirely clear to me from your first post whether you're talking about the way URLs are rewritten by Apache on their way to OJS, or whether you mean the URLs that are generated by OJS and sent back to the user. Which kind is getting generated incorrectly? (My suggestions to tinker with config.inc.php will affect the URLs OJS generates, but not of course how Apache rewrites those URLs when it receives requests and forwards them along to PHP.)

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

Re: Individual Domain Name for Each Journal within ONE OJS i

Postby annajonna » Thu Aug 01, 2013 4:54 am

asmecher wrote:Hi Anna,

Have you configured your installation to redirect to your single journal? (This is an option on the Site Settings page.) If you have, then base_url[index] will not be what you're looking for -- it'll be base_url[journalPath], where "journalPath" is the journal path from the Site Administrator's settings page for that journal.

Incidentally, it's not entirely clear to me from your first post whether you're talking about the way URLs are rewritten by Apache on their way to OJS, or whether you mean the URLs that are generated by OJS and sent back to the user. Which kind is getting generated incorrectly? (My suggestions to tinker with config.inc.php will affect the URLs OJS generates, but not of course how Apache rewrites those URLs when it receives requests and forwards them along to PHP.)

Regards,
Alec Smecher
Public Knowledge Project Team


Hi Alec, I had tested confinguring for a single journal but could not get that to work either, so I backed out of that an went for what I really wanted to do. Thanks for the explanation of how this all works, I needed to understand how this works and your text explains very clearly how the rewrite works in OJS so I figured out that the problems were in the rewrite code. So I started debugging.

The method was to turn on Rewrite Logging in the Apache virtual server config like so:
Code: Select all
    <IfModule mod_rewrite.c>
        RewriteLog "/var/log/ojs/logs/rewrite.log"
        RewriteLogLevel 1
    </IfModule>

Then change the inde.php file so that the beginning reads:
Code: Select all
<?php
var_dump($_SERVER);


Along with this I was tweaking a few settings in config.inc.php:
Code: Select all
[general]
base_url = "https://ojs.hi.is"
disable_path_info = On
allow_url_fopen = Off
base_url[index] = "https://ojs.hi.is"
base_url[irpa] = "http://irpa.is"
restful_urls = On


I noted that many things worked when disable_path_info = On . By commenting it out and debugging some more, I found that the _SERVER["PATH_INFO"] variable was missing on some pages and in some rewrite situations. So I changed index.php like so:
Code: Select all
<?php
$_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO'];
var_dump($_SERVER);


After this change, everything worked, and some work remains to be done to clarify the reasons for this. It may have to do with the facth that we are using Nginx as a front end load balancer for a cluster of Apache servers. Maybe the PATH_INFO variable somehow gets lost there. Anyway the scholars are happy now that their Open Journal System mostly works as it should. :)

Many thanks for your help and explanations,
Anna Jonna Armannsdottir <annaj@hi.is>
University of Iceland Computing Services
annajonna
 
Posts: 3
Joined: Fri Jul 26, 2013 8:05 am

Re: Individual Domain Name for Each Journal within ONE OJS i

Postby asmecher » Thu Aug 01, 2013 7:35 am

Hi Anna,

Thanks for following up with the details. I haven't worked with one of these environments myself, but it seems that some CGI or PHP configurations present data in "ORIG_PATH_INFO" but not in the standard "PATH_INFO" variable. There's a little bit of (inconclusive) detail at http://stackoverflow.com/questions/5629683/serverpath-info-and-serverporig-path-info-in-php.

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

Previous

Return to OJS Technical Support

Who is online

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