Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Problems with deployment in subfolder

Problems with deployment in subfolder

Added by Tobias Langer over 9 years ago

Hi,

I currently suffer from having my OpenProject deployed into a subfolder.

My setup is as follows:

I run the OpenProject in a docker container and followed the manual installation guide. The server is up and running and I can reach it from host side, as well as from “the outside”. The openproject container runs an apache2 server for itself and since I also want to use other apps on my server, I have an additional Apache2 container as a gateway which binds to port 80 on my host machine. Lets call this container Container A, whereas the openproject container is Container B.

The Apache2 in A is set up to be a ReverseProxy for the folder “/open_project” - and I configured the “rails_relative_url_root” to be “/open_project”, as well (as a matter of fact I forgot to set it in the first place, and reconfigured it with ./bin/rake assets:precompile later on, I’m not quite sure wether this is important?).

As I said, I can reach the start page of the OpenProject server just fine under http://myurl.de/open_project. It looks nice and all, however, all links from there on are not relative to the set relative_url_path, but are like http://myurl.de/login. What baffles me the most is that the design (including images) looks just fine.

P.S. Sorry if the information with the docker containers is unnecessary but I thought better include it.
PP.S. When I used the relative URL path “/openproject”, the assets:precompile step didn’t do anything, only when I changed it to “/open_project” it seemded to set any URLs.


Replies (2)

RE: Problems with deployment in subfolder - Added by Tobias Langer over 9 years ago

Hey again,

I found an ugly workaround, where I modified the “config.ru” file to ignore whether OpenProject is running with Passenger or not. Now it seems to work.

However I would prefer not to use a workaround, but the official way. How can I setup Passenger to do the right dispatching (I still don’t really understand how Passenger relates to address translation …)

Edit:

Ok after reloading the page, my CSS files weren’t found anymore, however I finally found the correct solution:

set the rails_relative_url_root to your domain
follow the steps described here: https://www.phusionpassenger.com/library/deploy/apache/deploy/ruby/#deploying-an-app-to-a-sub-uri

However, I strongly suggest you add this to your installation guide since I had a really hard time finding whether I have an error, or how to accomblish this,.

RE: Problems with deployment in subfolder - Added by Harald Reingruber about 8 years ago

Hi Tobias,

could you elaborate on your final solution?
So, in the end you reverted the rails_relative_url_root back to the default (“/”) and modified the apache virtual host config inside the docker container according to the link you posted?

Looking at the code on github, it looks like the SERVER_PATH_PREFIX environment variable should be taken into account as well: https://github.com/opf/openproject/search?utf8=%E2%9C%93&q=SERVER_PATH_PREFIX
I guess afterwards the rake task has to be triggered but I couldn’t figure out how… Can I just pass the env var into the container and call “./bin/rake setup:relative_root” or “./bin/rake packager:setup:relative_root” afterwards?

Thanks,
Harald

  • (1 - 2/2)
Loading...