0

I want to use a subdirectory for a chiliproject instance. Using apache passenger, I was thinking of using rewrites + alias, but then it gives me a 404. Adding a RailsBaseURI i get connection reset.

Is it routes.rb I should adapt or am I looking at the wrong place? It is working right now on https://mydomain.com but I'd like to have it on https://mydomain.com/tracker

1 Answers1

0

You can use passenger directly without having to use an alias or redirection. However, Passenger requires some special configuration for that. Please see one of our guides for a complete installation example.

Generally you need to configure similar to this (cited from the linked guide):

At first, we assume you have installed ChiliProject to /srv/www/chiliproject. This is not your DocumentRoot.

You need to hint Passenger a bit here so that it correctly finds your ChiliProject. So we create a symlink from the existing DocumentRoot directory to out ChiliProject installation.

ln -s /srv/www/chiliproject/public DOCUMENTROOT/chiliproject

Now add the following directives into your existing virtual host:

# TODO: Remember to replace DOCUMENTROOT with your actual path
<Directory DOCUMENTROOT>
  Options +SymLinksIfOwnerMatch
</Directory>

RailsBaseURI /chiliproject
# TODO: Remember to replace DOCUMENTROOT with your actual path
<Directory DOCUMENTROOT/chiliproject>
  Options -MultiViews

  Order deny,allow
  Allow from all
</Directory>
Holger Just
  • 52,918
  • 14
  • 115
  • 123