2012-01-25 2 views
1

평상시와 같이 우리의 다른 준비 환경에 레일스 앱을 배치하는 데 이상한 문제가 있습니다. SSL config.force_ssl = true를 사용하도록 Rails 3.1 앱을 구성했습니다. 프로젝트를 애매하게 만들 때 전쟁은 테스트 JBoss 서버 (4.2.2)에 올바르게 배치되며 https를 통해 액세스 할 수 있습니다. 프로덕션 환경으로 이동하면 다음 메시지를 표시하여 앱에 액세스 할 수 없습니다.Rails 3.1 SSL 리다이렉트 루프

업데이트 다시 배포 한 후 좀 더 자세한 정보가 있습니다. 사이트가 현재 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 

답변