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. Deploy in path

Deploy in path

Added by Deleted user about 10 years ago

Hi.

I deployed the OpenProject 4.0.8 package in a Ubuntu 14.04 instance. However, due to internal restrictions, the site must be accessible via http:/host/openproject instead of http://host/.
Therefore, I set rails_relative_url_root=/openproject which works fine for pages, but static files are still served and requested from the root directory, eg http://host/assets/.

It looks like setting that option is not enough. What else do I need to do?

Thank you in advance!


Replies (6)

RE: Deploy in path - Added by joern hees about 10 years ago

hmm, we couldn’t use it due to this in our company either :(

RE: Deploy in path - Added by t u about 10 years ago

hey,

did you guys check the Apache rewrite documentation?
http://httpd.apache.org/docs/current/rewrite/

Regards
TU

RE: Deploy in path - Added by Deleted user about 10 years ago

“mod_rewrite provides a way to modify incoming URL requests…”

However, the problem is that OpenProject does not serve static files from the sub path, but from root.

RE: Deploy in path - Added by t u about 10 years ago

… This allows you to map arbitrary URLs onto your internal URL structure in any way you like.

I posted the reply after a few quick reads on the web to give the tread owner a new idea, but I must admit it might be A LOT of work to get it done that way.

TU

RE: RE: Deploy in path - Added by Jonas Heinrich (Finn) about 10 years ago

Hi all,

I’m just writing to let you know that we read your question and are aware of that problem.
This is not a problem with OpenProject but generell with assets. When we precompile assets the root_path gets set and cannot be changed anymore.

The following solutions would be possible:

  1. One solution would be to precompile the assets again. If you changed the rails_url_root you could run openproject run rake assets:clobber and then openproject run rake assets:precompile. But unfortunately, you would have to this every time you update OpenProject.
  1. If you just want to test it or have small traffic you could try set config.serve_static_assets = true in openproject/config/environments/production.rb. This way, the assets would get created on time which makes the server slower.

Maybe there will be a better workaround for this at some time in the future. But for now that’s all I can think of. Does this help you?

Best,

Jonas

RE: Deploy in path - Added by Deleted user about 10 years ago

Jonas, thank you for your reply.

I just tried your first solution but unfortunately, it doesn’t work. The html pages still have the wrong path when referencing assets, e.g.

<script src="/assets/application-bd38ab7832e6d08d75460c0178439f9c.js"> </script>

By the way:
$ openproject-ce config:get rails_relative_url_root
/openproject

Any ideas?

Thanks,
Andreas

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