Add something new to Virb:

Virb

Are you sure you want to delete that?

or Cancel

 

Imported on May 20, 2009

Hosting HTTPS Rails app with plesk

This article assumes you have already setup your SSL cert on plesk (plenty of articles on that). Also, assumes you have running an existing Rails app on non-secure HTTP. We need to setup our vhost and vhost_ssl conf files that PLESK creates. Mine are located at:

/var/www/vhosts/domain.com/conf/

In there folder you should see:

httpd.include  vhost.conf  vhost_ssl.conf

If you don’t see the two vhost conf files that’s fine, just create them and add the following lines to both:

ServerName domain.com
DocumentRoot "/var/www/vhosts/domain.com/httpdocs/app/public"

This is saying point both ssl and non ssl to the same Rails app public folder. Now we need update plesk to show the new vhost conf and restart apache:

sudo /usr/local/psa/admin/sbin/websrvmng -a

and

sudo /etc/init.d/httpd restart

Now if you go to https://domain.com your site should be loaded just fine and shows that SSL is being used

Loading comments...

Likes

Details

Via Stephen Korecky

Viewed 34 times

© 2009 Stephen

virb.com/t/3015073
tweet!

Flag this text post!

Flag this text post as:

or Cancel

 

Advertisement

Flag this profile!

Flag this profile as:

or Cancel