How to make my ruby on rails application to work on with https protocol . My application rails version - 2.3.8 . I use phusion passenger and apache as server . Kindly help me how to make it up . -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Fri, Oct 7, 2011 at 2:04 PM, Sasi <ssasidaran86-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> How to make my ruby on rails application to work on with https > protocol . My application rails version - 2.3.8 . I use phusion > passenger and apache as server . Kindly help me how to make it up .That''s not Rails specific. You need to setup your Apache server to use SSL. I''m not an Apache expert, but I think you have to: - Enable mod_ssl - Setup the port SSL will listen to (The default might be commented on your conf file) - Define your virtualhost for that port. If your server already has SSL configured, you only need to define your vhost. Hope it helps.> > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Leonardo Mateo. There''s no place like ~ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks pal .. Using multiple virtual hosts in a single apache im to
configure the apache in https make my application to run in https.
<VirtualHost *:8080>
ServerName somename.com
Options FollowSymLinks
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
</VirtualHost>
<VirtualHost *:443>
RailsEnv development
   <Directory />
      Options FollowSymLinks
      AllowOverride None
      Order deny,allow
#      Deny from none
      Allow from all
   </Directory>
ProxyPreserveHost on
Document /home/sasi/SampleApp/public
ServerName somename.com
ErrorLog "/usr/local/apache2/logs/error_log"
TransferLog "/usr/local/apache2/logs/access_log"
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:
+SSLv2:+EXP:+eNULL
SSLCertificateFile "/home/sasi/Demo_ssl_root_certificates/
ssl_demo211.cer"
<FilesMatch "\.(cgi|shtml|phtml|php)$">
    SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/usr/local/apache2/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>
BrowserMatch ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0
CustomLog "/usr/local/apache2/logs/ssl_request_log" \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</Virtualhost>
Through single server setup im able to achieve this (placing app and
db in the server ) works fine.  Can u suggest me . How can i achieve
this in a three tier architecture . (Web component simple apache , App
server containing passenger module with apache pointing the
application , db server in a seperate machine ) . To db  and app im
able to esatblish connection. But with respect to https . When i call
from webserver to app internally the URL shifts back to http from
https.
On Oct 7, 10:31 pm, Leonardo Mateo
<leonardoma...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> On Fri, Oct 7, 2011 at 2:04 PM, Sasi
<ssasidara...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > How to make my ruby on rails application to work on with https
> > protocol .  My application rails version - 2.3.8 . I use phusion
> > passenger and apache as server . Kindly help me how to make it up .
>
> That''s not Rails specific. You need to setup your Apache server to
use SSL.
> I''m not an Apache expert, but I think you have to:
> - Enable mod_ssl
> - Setup the port SSL will listen to (The default might be commented on
> your conf file)
> - Define your virtualhost for that port.
>
> If your server already has SSL configured, you only need to define your
vhost.
>
> Hope it helps.
>
>
>
> > --
> > You received this message because you are subscribed to the Google
Groups "Ruby on Rails: Talk" group.
> > To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > For more options, visit this group
athttp://groups.google.com/group/rubyonrails-talk?hl=en.
>
> --
> Leonardo Mateo.
> There''s no place like ~
-- 
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks pal. Using a single apache with multiple virtual host im able
to achieve https and run my run application .
<VirtualHost *:8080>
ServerName somename.com
Options FollowSymLinks
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
</VirtualHost>
<VirtualHost *:443>
RailsEnv development
   <Directory />
      Options FollowSymLinks
      AllowOverride None
      Order deny,allow
#      Deny from none
      Allow from all
   </Directory>
ProxyPreserveHost on
Document /home/sasi/SampleApp/public
ServerName somename.com
ErrorLog "/usr/local/apache2/logs/error_log"
TransferLog "/usr/local/apache2/logs/access_log"
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:
+SSLv2:+EXP:+eNULL
SSLCertificateFile "/home/sasi/Demo_ssl_root_certificates/
ssl_demo211.cer"
<FilesMatch "\.(cgi|shtml|phtml|php)$">
    SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/usr/local/apache2/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>
BrowserMatch ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0
CustomLog "/usr/local/apache2/logs/ssl_request_log" \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</Virtualhost>
Through single server setup im able to achieve this (placing app and
db in the server ) works fine.  Can u suggest me . How can i achieve
this in a three tier architecture . (Web component simple apache , App
server containing passenger module with apache pointing the
application , db server in a seperate machine ) . Between web,db and
app im able to esatblish connection. But with respect to https . When
i call from webserver to app internally the URL shifts back to http
from https so url breaks up in this case. Any ruby plugin / gum which
will support https (SSL) to stay .
On Oct 7, 10:31 pm, Leonardo Mateo
<leonardoma...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> On Fri, Oct 7, 2011 at 2:04 PM, Sasi
<ssasidara...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > How to make my ruby on rails application to work on with https
> > protocol .  My application rails version - 2.3.8 . I use phusion
> > passenger and apache as server . Kindly help me how to make it up .
>
> That''s not Rails specific. You need to setup your Apache server to
use SSL.
> I''m not an Apache expert, but I think you have to:
> - Enable mod_ssl
> - Setup the port SSL will listen to (The default might be commented on
> your conf file)
> - Define your virtualhost for that port.
>
> If your server already has SSL configured, you only need to define your
vhost.
>
> Hope it helps.
>
>
>
> > --
> > You received this message because you are subscribed to the Google
Groups "Ruby on Rails: Talk" group.
> > To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > For more options, visit this group
athttp://groups.google.com/group/rubyonrails-talk?hl=en.
>
> --
> Leonardo Mateo.
> There''s no place like ~
-- 
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.