1
和往常一樣,我在將Rails應用程序部署到不同的臨時環境時遇到了一些奇怪的問題。我已經配置了我的Rails 3.1應用程序以使用SSL config.force_ssl = true。當我搗亂項目時,戰爭會正確地部署到我們的測試JBoss服務器(4.2.2),並且可以通過https訪問。當我轉向生產時,應用程序無法訪問,並提供以下消息。Rails 3.1 SSL重定向循環
UPDATE 好的,再次部署後我有更多的信息。該網站上目前https://ibs.collegegreen.net/Campus-Commerce託管網頁時被擊中,我接受,最終解析爲https://ibs.collegegreen.net/Campus-Commerce//////////////////////
另外一個重定向循環錯誤,我們有代理請求回到我們的JBoss服務器Apache服務器。
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/MyApp]] cache: [GET /MyApp//] miss
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/MyApp]] cache: [GET /MyApp///] miss
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/MyApp]] cache: [GET /MyApp////] miss
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/MyApp]] cache: [GET /MyApp/////] miss
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/MyApp]] cache: [GET /MyApp//////] miss
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/MyApp]] cache: [GET /MyApp///////] miss
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/MyApp]] cache: [GET /MyApp////////] miss
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/MyApp]] cache: [GET /MyApp/////////] miss
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/MyApp]] cache: [GET /MyApp//////////] miss
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/MyApp]] cache: [GET /MyApp///////////] miss
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/MyApp]] cache: [GET /MyApp////////////] miss
production.rb
MyApp::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
# Compress JavaScripts and CSS
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
# Generate digests for assets URLs
config.assets.digest = true
config.assets.js_compressor = :closure
# Defaults to Rails.root.join("public/assets")
#config.assets.manifest = Rails.root.join("config")
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = true
#config.assets.precompile += [ '*.js', 'cc/*.js', '*.css', 'skins/*.css', 'smoothness/*.css' ]
config.assets.precompile += %w(*.css *.js)
# Enable threaded mode
config.threadsafe!
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found)
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
end