Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble installing in sub folder of the domain #344

Open
jbogdani opened this issue Feb 7, 2024 · 1 comment
Open

Trouble installing in sub folder of the domain #344

jbogdani opened this issue Feb 7, 2024 · 1 comment
Labels
notRelated Not related with docker-ojs. support User asking for help.

Comments

@jbogdani
Copy link

jbogdani commented Feb 7, 2024

Hello,

I'm having issues installing the docker version in a subdomain. Let's assume my main domain is example.com and I want my OJS installation to be available at example.com/ojs.

I changed in .env the PROJECT_DOMAIN variable:

PROJECT_DOMAIN=example.com/ojs

I also changed volumes/config/ojs.config.inc.php :

base_url = "https://example.com/ojs"

And here is my nginx reverse proxy settings:

location /ojs/ {
       rewrite ^/ojs/(.*)$ /$1 break;
       proxy_pass http://127.0.0.1:8081/;
    }

The problem is that when I try to access my installation at https://example.com/ojs, I get redirected to https://example.com/index.php/index/install` which does not exist (since ojs subdirectory is missing).

If I type https://example.com/ojs/index.php/index/install I get the installation page with missing scripts and style-sheets, since these refer to the domain's root.

I guess I am missing something very basic here and any help is much appreciated.

Julian

@marcbria
Copy link
Collaborator

marcbria commented Feb 28, 2024

Hi @jbogdani

I don't know if you already fixed it.

If not, some suggestions:

  1. PROJECT_DOMAIN is just the domain, not the url, so it should be something like:
    PROJECT_DOMAIN=example.com
    
  2. base_url if fine, but sometimes is even better don't set it and let OJS decide

Said that, I'm not working with nginx mysqlf (I use apache that is PKP's recommendation for OJS, and with traefik as revierse proxy) so I don't know much about it but reading your reverse proxy settings, could be this line the culpit?

rewrite ^/ojs/(.*)$ /$1 break;

If I understand it well is where the /ojs slug is removed.

@marcbria marcbria added notRelated Not related with docker-ojs. support User asking for help. labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notRelated Not related with docker-ojs. support User asking for help.
Projects
None yet
Development

No branches or pull requests

2 participants