[SOLVED] How to rename a directory where OJS3 was installed?

OJS 3.1.1-4, upgraded from 2.4.8. If I open my user Dashboard, I get “Loading” at the top of the page. If I choose Identity, Contact, Roles, etc I get:
{“status”:true,“content”:"\n<a href="#" class=“requestHelpPanel pkp_help_link pkp_help_tab” data-topic=“user-profile.md”>\n\t<span class=“fa fa-info-circle pkpIcon–inline” aria-hidden=“true”></span>\n\t\t\tHelp\n\t</a>\n\n<script type=“text/javascript”>\n\t$(function() {\n\t\t// Attach the form handler.

Any ideas what’s wrong? I did a test upgrade a few weeks back, and then it worked.

If I rename OJS directory from /var/www/html/ojs to /var/www/html/ojs3 (i.e. the directory where the first upgrade was done), then it works. I deleted cache directories. Searched for file contents “/var/www/html/ojs” - nothing found.

Seems to work now when renamed directory again. I don’t know what was wrong before.
Edit: no, still hangs, but works if I make /var/www/html/ojs3 (old original directory) symlink to /var/www/html/ojs (the new renamed directory) and open the old URL https://…/ojs3. The new URL https://…/ojs still hangs.

Hi @Nerijus_Baliunas

When directory name is changed, the apache config for this site also should be changed accordingly. What VirtualHost’s DocumentRoot directive for you site states right now? VirtualHost Examples - Apache HTTP Server Version 2.4
Does it point to the right directory?

1 Like

DocumentRoot was OK:
DocumentRoot “/var/www/html”
But thank you for the hint, I had the following section just below DocumentRoot:
<Directory /var/www/html/ojs/lib>
Order Deny,Allow
Deny from All
Allow from None

Commenting it out helped. It was done for OJS2 for security reasons.

What was the security concern that led to this restriction on the “lib” directory?

There are files in the “lib/pkp/” and other directories which will need to be web-accessible (esp. javascript) in both 2.x and 3.x.

Nothing serious, just to be safe. It was recommended to me by a member of university security team. This setup worked quite OK with OJS2, but now I see that not everything was OK, and commenting out helped with OJS2 too.