2012-01-25 2 views
1

Как обычно, у меня возникают странные проблемы с развертыванием приложения Rails в наших разных промежуточных средах. Я настроил приложение Rails 3.1 для использования SSL config.force_ssl = true. Когда я пробовал проект, война корректно развертывается на нашем тестовом сервере JBoss (4.2.2) и доступна через https. Когда я перехожу к производству, приложение недоступно, предоставляя следующие сообщения.Rails 3.1 Цикл переадресации SSL

ОБНОВЛЕНИЕ Хорошо, после развертывания снова у меня есть немного больше информации. Сайт в настоящее время размещен на https://ibs.collegegreen.net/Campus-Commerce, когда пострадали страницы. Я получаю ошибку цикла переадресации, которая в конечном итоге разрешает https://ibs.collegegreen.net/Campus-Commerce//////////////////////

Кроме того, у нас есть сервер Apache, который проксирует запросы обратно на наши серверы JBoss.

[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 

ответ

Смежные вопросы