I'm running a rails app on http://www.naildrivin5.com/scalatour. It works fine. When I log in to the app using restful_authentication
, I get taken to the http://www.naildrivin5.com instead of the app. Weird.
This seems like I've misconfigured something. Further, there's a few places where I'm hand-creating some urls, and I need access to the "application context root" (i.e. scalatour
in my case) to form the URL properly. I ended up throwing it in my configuration, but this just seems wrong.
Apache, with Passenger, running a Rails app:
Apache conf:
<VirtualHost 69.89.3.135:80>
DocumentRoot /somewhere/naildrivin5.com/html
ServerName naildrivin5.com
RailsBaseURI /scalatour
PassengerPoolIdleTime 5
# other things not related
</VirtualHost>
passenger.conf
:
LoadModule passenger_module /usr/share/passenger/ext/apache2/mod_passenger.so
PassengerRoot /usr/share/passenger
PassengerRuby /usr/bin/ruby
PassengerLogLevel 2
/somewhere/naildrivin5.com/html/scalatour
is symlinked to my Rails app's public
folder.
The app works fine, except for authentication, using restful_authentication
. After I log in, I'm taken to the web server root, not the application root.
How should/can I configure this, how can I access this at runtime, and how can I best configure my local dev environment to do this (or not care about it)?