Rails 3.x中CAS Server中的安装问题

Ank*_*kit 11 ruby ruby-on-rails rubycas rubycas-server rubycas-client

我已经安装rubyCAS Server在ec2服务器上,使用Rails 3.2和Ruby 1.9.3以及配置configure.yml文件,我的

server: webrick
port: 9292
ssl_cert: /mnt/rubyonrails/testingcas.pem 
Run Code Online (Sandbox Code Playgroud)

注意:我fortestingonly.managemyasc.devserver在生成自签名SSL时提到了域名'

database:
adapter: mysql2
database: casserver
username: root
password: XXXXX
host: localhost
reconnect: true

authenticator:
class: CASServer::Authenticators::SQL
database:
adapter: mysql2
database: mmx_dev
username: root
password: XXXXX
host: localhost
user_table: userdemo
username_column: username
password_column: password
Run Code Online (Sandbox Code Playgroud)

,我也映射CAS服务器的URL在我的本地/etc/host184.72.242.142 fortestingonly.managemyasc.devserver

在环境文件中: :cas_base_url => "https://fortestingonly.managemyasc.devserver:9292"

现在我已经启动了Rubycas服务器和我的应用程序服务器但是当我尝试访问我的应用程序URL时,在我的应用程序日志中出现以下错误:

Started GET "/" for 122.162.49.205 at 2014-01-31 04:01:14 -0800
Processing by DashboardController#index as HTML
Guessed service url: "http://ohio-ortho.managemyasc.devserver:3000/"
Generated login url: https://fortestingonly.managemyasc.devserver:9292/login?             service=http%3A%2F%2Fohio-ortho.managemyasc.devserver%3A3000%2F
Redirecting to "https://fortestingonly.managemyasc.devserver:9292/login?service=http%3A%2F%2Fohio-ortho.managemyasc.devserver%3A3000%2F"
Redirected to https://fortestingonly.managemyasc.devserver:9292/login?service=http%3A%2F%2Fohio-ortho.managemyasc.devserver%3A3000%2F
Filter chain halted as CASClient::Frameworks::Rails::Filter rendered or redirected
Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
Oink Action: dashboard#index
Memory usage: 779472 | PID: 29159
Instantiation Breakdown: Total: 1 | ActiveRecord::SessionStore::Session: 1
Oink Log Entry Complete
Run Code Online (Sandbox Code Playgroud)

Sah*_*bar 0

首先,这不是 @MatthewFord 指出的错误。

其次,这种重定向的发生是由于 CAS 服务器的内置和默认功能,您可以将其视为预配置的 Web 服务器,就像脚手架一样。

第三,为了纠正此重定向,您需要签入routes.rb文件以及与包含路由过滤器的 Web 服务器相关的路由文件以及\正在重定向的某个位置。

第四,如果这也不起作用,那么这个问题可能是由于SSL Certificate配置造成的。rootSSL 证书配置通常负责由 Web 服务器进行此类重定向。