On my public Apache2 server, access to my Rails 3 application is through a sub-URI, for example
https:
this server is configured for a reverse proxy to another Apache2 server on which the Rails application is installed through Passenger:
http:
In my VirtualHost settings for the intranet server, I have
SetEnv RAILS_RELATIVE_URL_ROOT "/myapp"
In my config / environment / production.rb file, I uncommented the line
config.log_level = :debug
So the very first execution method in my application:
logger.debug { "The environment variable RAILS_RELATIVE_URL_ROOT is presently #{ENV['RAILS_RELATIVE_URL_ROOT']}" }
and, of course, in the production log file you will see:
The environment variable RAILS_RELATIVE_URL_ROOT is presently /myapp
However, the following line in the log is obviously the browser:
Redirected to https:
I found out about this environment variable here on Stackoverflow, so one person for whom it worked, but the other person hit by it didn’t know what another said. So, in my experience, we are now on a tie. Did I miss something?