Open link in a new tab

Content

Expand project menu

Installation to subdirectory (http://mywebsite.com/openproject) - Apache, Centos6, Mysql

Guys,

Having a bit of a problem installing openproject in a subdirectory on my Centos system. When I use the “VirtualHost” directives the app works fine but if I use the old “Directory” directives I used for OP2.4 it doesn’t route the assets correctly.

<Directory /data/www/openproject/public>
   Options Indexes FollowSymLinks -MultiViews ExecCGI
   RailsENV production
   RackBaseURI /openproject
   PassengerResolveSymlinksInDocumentRoot on
   PassengerAppRoot /data/www/openproject/
</Directory>
Alias /openproject /data/www/openproject/public

Any ideas how I can deploy OP3 to a subdirectory(http://mywebsite.com/openproject) rather than the root?

Thanks

Message actions

I guess it helps to read the config files.. sorry. I have it working now thanks. For those who find my forum post here’s the solution I changed to make it work.

1. Go to your config directory, (Should be something like /home/openproject/openproject/config)
2. Copy the configuration.yml.example to configuration.yml
2. Move down to the default section of the file
3. Uncomment the line talking about rails_relative_url_root
4. Add your sub-directory to the line, follow the directions in the file.
5. Enjoy. 
Message actions

Hi David,

you have to set the rails_relative_url_root in your configuration.yml to the subdirectory before you run bundle exec rake assets:precompile otherwise your assets won’t work properly.

E.g. for your example you have to set:

  rails_relative_url_root: "/public"

Best
Ratzi