Forum: Ruby on Rails https problems

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Glen (Guest)
on 2008-10-08 01:06
(Received via mailing list)
I'm having a problem but don't know what is causing it so I don't know
exactly where to post, please bear with me.

I'm trying to set up https access however whenever I go to
https://url_for_site
the root route renders but the url is rewritten to http://url_for_site.
The ssl request shows in the apache logs but obviously no further ssl
requests show up.  I've tried several tutorials and ideas and nothing
I do makes any difference.

I'm using Apache 2.2 with Mongrel on Windows.

Does anyone have any ideas?

Thanks,
Glen
Freddy A. (Guest)
on 2008-10-08 02:55
(Received via mailing list)
Please post your https virtualhost..

Do you have any .htaccess files anywhere?
Glen (Guest)
on 2008-10-08 18:07
(Received via mailing list)
<VirtualHost _default_:443>
  ServerName cnm746852.techno.tvinet:443
  ServerAdmin removed_email_address@domain.invalid
  TransferLog "C:\Program Files\Apache Software Foundation
\Apache2.2\logs\ssl_transfer.log"
  ErrorLog "C:\Program Files\Apache Software Foundation\Apache2.2\logs
\ssl_error.log"
  CustomLog "C:\Program Files\Apache Software Foundation\Apache2.2\logs
\ssl_access.log" combined

  ProxyPass / http://localhost:3000/
  ProxyPassReverse / http://localhost:3000

  SSLEngine on

  RequestHeader set X_FORWARDED_PROTO 'https'

  SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:
+SSLv2:+EXP:+eNULL

  SSLCertificateFile "C:/Documents and Settings\glen\workspace
\user_accounts\host.cert"

  SSLCertificateKeyFile "C:/Documents and Settings\glen\workspace
\user_accounts\host.key"

<FilesMatch "\.(cgi|shtml|phtml|php)$">
    SSLOptions +StdEnvVars
</FilesMatch>
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-
bin">
    SSLOptions +StdEnvVars
</Directory>

  BrowserMatch ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

  CustomLog "C:/Program Files/Apache Software Foundation/Apache2.2/
logs/ssl_request.log" \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>


I haven't created any .htaccess files so if any they are defaults in
default locations.
Glen (Guest)
on 2008-10-20 20:41
(Received via mailing list)
Well, I seem to be running in circles.  I'll try posting to the
mongrel list maybe the problem lies there?
Freddy A. (Guest)
on 2008-10-20 23:57
(Received via mailing list)
Sorry was away.. Do you have any rails plugins installed?

If you try https://yourhost/images/someimage.jpg does that serve the
image in https?

Is there anything in the rails log about redirect? or maybe the apache
logs?
Glen (Guest)
on 2008-10-21 22:58
(Received via mailing list)
On Oct 20, 1:57 pm, Freddy A. <removed_email_address@domain.invalid> wrote:
> Sorry was away.. Do you have any rails plugins installed?
>
> If you tryhttps://yourhost/images/someimage.jpgdoes that serve the
> image in https?
>
> Is there anything in the rails log about redirect? or maybe the apache
> logs?

Yes to all three.

I have will_paginate installed.  Although as a gem not "as a plugin"

images are served in https

and in the log I get the following:
Redirected to http://
Freddy A. (Guest)
on 2008-10-22 00:07
(Received via mailing list)
Glen could you post the entire message including the initial request
from the rails log.
Glen (Guest)
on 2008-10-22 00:15
(Received via mailing list)
Nevermind, that was a redirect due to a session timeout.  Here is the
rails log when I request the main page without the timeout issue (it
still doesn't render https without the timeout):

Rendering C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
action_controller/templates/rescues/layout.erb (not_found)


Processing AuthenticationController#start (for 10.131.12.17 at
2008-10-21 14:10:55) [GET]
  Session ID: 3df2ea2f70658b7e93b5f98d08b2b743
  Parameters: {"action"=>"start", "controller"=>"authentication"}
Rendering template within layouts/authentication
Rendering authentication/start
Completed in 0.01600 (62 reqs/sec) | Rendering: 0.01600 (100%) | DB:
0.00000 (0%) | 200 OK [http://cnm746852.techno.tvinet/]


Processing AuthenticationController#start (for 10.131.12.17 at
2008-10-21 14:12:19) [GET]
  Session ID: 3df2ea2f70658b7e93b5f98d08b2b743
  Parameters: {"action"=>"start", "controller"=>"authentication"}
Redirected to http://cnm746852.techno.tvinet/
Filter chain halted as [:ensure_proper_protocol]
rendered_or_redirected.
Completed in 0.00010 (10000 reqs/sec) | DB: 0.00000 (0%) | 302 Found
[https://cnm746852.techno.tvinet/]


Processing AuthenticationController#start (for 10.131.12.17 at
2008-10-21 14:12:22) [GET]
  Session ID: 3df2ea2f70658b7e93b5f98d08b2b743
  Parameters: {"action"=>"start", "controller"=>"authentication"}
Rendering template within layouts/authentication
Rendering authentication/start
Completed in 0.01600 (62 reqs/sec) | Rendering: 0.00000 (0%) | DB:
0.00000 (0%) | 200 OK [http://cnm746852.techno.tvinet/]
This topic is locked and can not be replied to.