OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Looking for tips about setting the URL

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.

Looking for tips about setting the URL

Postby yaliang » Mon Jul 24, 2006 8:14 am

Dear Friends,

I have a question about the URL address which will be displayed in the browser. The OJS system and MyJournal was already installed and set up. The folder was put in /wwwroot/ojs. At the same time, I have registered a domain name (MyJournal.org) and assigned the server's ip for accessing the website. Currently, a user could directly access the website via:MyJournal.org/ojs/index.php/MyJournal. However, when I browse the OJS Journals listed on the http://pkp.sfu.ca/ojs-journals page, most of them could be directed access via their domain names, such as http://www.ajol.info/.

Is it possible to use MyJournal.org to access and display my website? I tried the base_URL settings in the confic.ini.php file, but it failed. Does anyone could tell me the tips to set and show the URL.

Thank you very much :D

Best Regards
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Postby asmecher » Mon Jul 24, 2006 8:37 am

Hi yaliang,

The best way to accomplish this would be to move everything from /wwwroot/ojs into /wwwroot -- making sure you update config.inc.php as necessary.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8840
Joined: Wed Aug 10, 2005 12:56 pm

Postby yaliang » Mon Jul 24, 2006 8:42 am

Dear Alec:

Yes, I tried that before I posted the question. Although the contents could be accessed, however, the layout was incorrect. Could you tell me what shoud I update in the config.inc.php file?
Thank you very much :D

Regards,
Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Postby asmecher » Mon Jul 24, 2006 8:51 am

Hi yaliang,

You'll need to update anything that refers to the old installation directory -- just search for wwwroot in config.inc.php and change anything that needs changing. It may also be that you need to re-configure some file permissions. Make sure that the following directories, their contents, and all subdirectories and their contents are writable by the web server user (typically www-data or nobody):
  • cache
  • public (as configured in config.inc.php under public_files_dir)
  • files (as configured in config.inc.php under files_dir)
If moving the OJS installation causes layout problems, I suspect you need to make sure the files directory is in place and has the correct permissions. If you changed the base_url configuration options in config.inc.php, this could also cause the problem.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8840
Joined: Wed Aug 10, 2005 12:56 pm

Postby yaliang » Tue Jul 25, 2006 6:39 am

Dear Alec:

Thanks for your explanation. I check the permissions for the specific folders and files. There are no problems with that. At the same time, the relative base_url variables in the confic.ini.php file were not modified from the installation. Only the base_url="http://localhost/" is activate, others are disable with the ";" in default.
Currently, there are two problems:
1. When I access the website directly (http://140.118.10.104), the URL address will automatically refresh to http://140.118.10.104\/index.php/IJDesign. Since this is not a valid URL, an error of "Server not found" is shown.
2. The first page could be accessed via manually input the full address: http://140.118.10.104/index.php/IJDesign. However, as you can see, the layout is rendered incorrectly. At the same time, there are problems with the hyperlinks on the page.

Is it necessary to modify the index.php file?

Also, if there's only one journal hosted, is it possible to access the Journal via the domain name (such as http://myjournal.org, without the following /index.php/MyJournal)? Could you give me some suggestions to try?

Thanks for your help and time ! :)
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Postby asmecher » Tue Jul 25, 2006 8:42 am

Hi Yaliang,

It sounds like OJS is having trouble figuring out the URL to use automatically; some odd server configurations can cause this. Try configuring the base_url[index] and base_url[IJDesign] directives in config.inc.php with something like the following:
Code: Select all
base_url[index] = http://www.myjournal.org
base_url[IJDesign.] = http://www.myjournal.org
You can configure OJS to redirect to the journal home page instead of the site home page in the Administrator's Site Settings page; if you want to further hide parts of the URL, you'll need to look into Apache rewriting (which OJS should support using the above base_url directives).

(EDIT: I see that there's a period at the end of your journal path -- make sure you include it in the config statement above.)

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8840
Joined: Wed Aug 10, 2005 12:56 pm

Postby yaliang » Tue Jul 25, 2006 9:36 am

Dear Alec:

Thanks for your help. Now, the layout problem was solved. However, the website still could not be directly accessed via "http://104.ijdesign.org". Someone should type the full path "http://140.118.10.104/index.php/IJDesign" to get the homepage.
At the same time, all of the hyperlinks are unable to open the correct pages. For instance, the property of the "about" link is "http://104.ijdesign.org/about", not as correct as the system path. Does this problem relate to the canonical URL of the OJS installation (base_url = "http://localhost/") in the config.ini.php file?
Please give me your suggestions.

Thanks for your time and efforts :)
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Postby yaliang » Tue Jul 25, 2006 9:57 am

Dear Alec:

A few minutes ago, I tried to update your suggestions as:
Code: Select all
base_url[index] = http://www.myjournal.org
base_url[IJDesign] = http://www.myjournal.org/index.php/IJDesign

Then, the problems of hyperlinks were solved. In addition, I think I could use the redirection function for automatically direct the users from "http://www.myjournal.org" to "http://www.myjournal.org/index.php/IJDesign".

Could you tell me some resources for figuring out the "Apache rewriting"?

Thank you very very much :lol:

Wonderful wishes,

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Postby yaliang » Tue Jul 25, 2006 10:14 am

Dear Alec:

Sorry, I found a serious problem about the Login function. After I input the name & password then clicked the Log In button, the page was refreshed and looped back with empty fields. The URL was changed as "http://104.ijdesign.org/index.php/IJDesign/login?source=%2Findex.php%2FIJDesign%2Fuser".

Please give me some hits to solve this problem. :oops:

Thanks a lot.

Regards,

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Postby asmecher » Tue Jul 25, 2006 11:42 am

Hi Yaliang,

Two possibilities:
  • Does your browser have cookies enabled? OJS requires cookie support.
  • Try disabling the session_check_ip option in config.inc.php; if you're connected to the Internet behind a proxy farm, OJS might think you're trying to hack in and reject your login. (Disabling the IP check results in a very small decrease in system security.)


Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8840
Joined: Wed Aug 10, 2005 12:56 pm

Postby yaliang » Tue Jul 25, 2006 9:59 pm

Dear Alec:

Thanks for your reply. Actually, I tried your suggestions before posting the log-in problem. From the previous discussion on this forum, it seems that many people have encountered the same problem with OJS. I don't know how the problem was solved; however, those two solutions you replied did not work for my case.
Is there any other setting I should check to solve the problem?

Best regards,

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Postby asmecher » Wed Jul 26, 2006 9:20 am

Hi Yaliang,

Try the modification described at http://pkp.sfu.ca/support/forum/viewtopic.php?p=2583#2583; note that this change is part of OJS 2.1.1.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8840
Joined: Wed Aug 10, 2005 12:56 pm

Postby yaliang » Fri Jul 28, 2006 4:51 pm

Dear Alec:

Thanks for your help.
The log-in problem was solved.

Best regards,

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am


Return to OJS Technical Support

Who is online

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