# Https problems

**URL:** <https://www.ruby-forum.com/t/https-problems/150380>\
**Category:** Rails\
**Created:** [October 7, 2008, 11:06pm UTC](https://www.ruby-forum.com/t/https-problems/150380 "2008-10-07T23:06:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8c91f0/32.png) [@Glen](https://www.ruby-forum.com/u/Glen)\
**Post date:** [October 7, 2008, 11:06pm UTC](https://www.ruby-forum.com/t/https-problems/150380/1 "2008-10-07T23:06:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Glen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8c91f0/32.png) [@Glen](https://www.ruby-forum.com/u/Glen)\
**Post date:** [October 8, 2008, 12:55am UTC](https://www.ruby-forum.com/t/https-problems/150380/2 "2008-10-08T00:55:24Z")

</div>

Please post your https virtualhost…

Do you have any .htaccess files anywhere?

---

<div class="post-metadata">

**Author:** ![Glen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8c91f0/32.png) [@Glen](https://www.ruby-forum.com/u/Glen)\
**Post date:** [October 8, 2008, 4:07pm UTC](https://www.ruby-forum.com/t/https-problems/150380/3 "2008-10-08T16:07:48Z")

</div>

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/](http://localhost:3000/)  
ProxyPassReverse / [http://localhost:3000](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  
  
\<Directory “C:/Program Files/Apache Software Foundation/Apache2.2/cgi-  
bin”\>  
SSLOptions +StdEnvVars

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”

I haven’t created any .htaccess files so if any they are defaults in  
default locations.

---

<div class="post-metadata">

**Author:** ![Glen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8c91f0/32.png) [@Glen](https://www.ruby-forum.com/u/Glen)\
**Post date:** [October 20, 2008, 6:41pm UTC](https://www.ruby-forum.com/t/https-problems/150380/4 "2008-10-20T18:41:48Z")

</div>

Well, I seem to be running in circles. I’ll try posting to the  
mongrel list maybe the problem lies there?

---

<div class="post-metadata">

**Author:** ![Glen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8c91f0/32.png) [@Glen](https://www.ruby-forum.com/u/Glen)\
**Post date:** [October 20, 2008, 9:57pm UTC](https://www.ruby-forum.com/t/https-problems/150380/5 "2008-10-20T21:57:55Z")

</div>

Sorry was away… Do you have any rails plugins installed?

If you try [https://yourhost/images/someimage.jpg](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?

---

<div class="post-metadata">

**Author:** ![Glen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8c91f0/32.png) [@Glen](https://www.ruby-forum.com/u/Glen)\
**Post date:** [October 21, 2008, 8:58pm UTC](https://www.ruby-forum.com/t/https-problems/150380/6 "2008-10-21T20:58:06Z")

</div>

On Oct 20, 1:57 pm, Freddy A. [removed\_email\_address@domain.invalid](mailto: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://

---

<div class="post-metadata">

**Author:** ![Glen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8c91f0/32.png) [@Glen](https://www.ruby-forum.com/u/Glen)\
**Post date:** [October 21, 2008, 10:07pm UTC](https://www.ruby-forum.com/t/https-problems/150380/7 "2008-10-21T22:07:36Z")

</div>

Glen could you post the entire message including the initial request  
from the rails log.

---

<div class="post-metadata">

**Author:** ![Glen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8c91f0/32.png) [@Glen](https://www.ruby-forum.com/u/Glen)\
**Post date:** [October 21, 2008, 10:15pm UTC](https://www.ruby-forum.com/t/https-problems/150380/8 "2008-10-21T22:15:13Z")

</div>

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/](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/](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/](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/](http://cnm746852.techno.tvinet/)]
