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 .
On Fri, Oct 7, 2011 at 2:04 PM, Sasi removed_e[email protected] 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 G. “Ruby
on Rails: Talk” group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
–
Leonardo M…
There’s no place like ~
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 *:443>
RailsEnv development
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from none
Allow from all
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
<Directory “/usr/local/apache2/cgi-bin”>
SSLOptions +StdEnvVars
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”
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 .
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 *:443>
RailsEnv development
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from none
Allow from all
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
<Directory “/usr/local/apache2/cgi-bin”>
SSLOptions +StdEnvVars
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”
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.