Apache Passenger SUBURI Devise routing problem.

21 views
Skip to first unread message

Dave Benson

unread,
Aug 10, 2016, 1:28:47 PM8/10/16
to Devise
Anyone else have this problem and or found a solution?

I followed this guide to set up devise in a mountable engine.
https://github.com/plataformatec/devise/wiki/How-To:-Use-devise-inside-a-mountable-engine

All worked really well for me locally, and when I deploy to the root context on my deployment server.

However, if I configure multiple rails applications using Apache virtual hosts, with the suggested Passenger config.  Devise routing seems to be wrong: adding the SUBURI in twice.

example of devise rounting when accessing a restricted object

Apache . Passenger Config

LoadModule passenger_module /usr/local/rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/passenger-5.0.30/buildout/apache2/mod_passenger.so

   <IfModule mod_passenger.c>

     PassengerRoot /usr/local/rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/passenger-5.0.30

     PassengerDefaultRuby /usr/local/rbenv/versions/2.2.1/bin/ruby

     PassengerInstanceRegistryDir /var/run/passenger-instreg

   </IfModule>


        Alias /euss /srv/rails/euss/public

        <Location /euss>

          PassengerBaseURI /euss

          PassengerAppRoot /srv/rails/euss

          Order allow,deny

          Allow from all

        </Location>


        <Directory /srv/rails/euss/public>

          Allow from all

          Options -MultiViews

        </Directory>



Thanks





Reply all
Reply to author
Forward
0 new messages