1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Hosting Rails apps

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by StuB, Nov 27, 2009.

  1. StuB

    StuB Guest

    0
     
    Hi,
    I'm trying to host a Ruby on Rails app on my CentOS server that has Plesk on it.

    But my domain isn't showing my app, it's just showing the "Default Parallel Plesk Panel Page" (which takes a ridiculously long time to load).

    Am I right in thinking that I should create a domain in Plesk as normal, e.g. mydomain.co.uk. Then I create my Rails app in that folder at /var/www/vhosts/mydomain.co.uk/railsapp/ correct?

    I've heard that Phusion Passenger is the best way to host Rails sites, and so have installed it and configured it as suggested here: http://tnux.net/2008/06/23/plesk-passenger-mod_rails-railsenterpriseedition-ruby-on-rails/. In fact, I've followed all the steps on this page and it still isn't showing up.

    What have I done wrong?

    When I create the domain in Plesk, do I want the DNS service on? Do I need to configure it? Also, what hosting type do I want? No hosting? Or Web Hosting?

    Thanks!
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,546
    Likes Received:
    1,240
    Location:
    Novosibirsk, Russia
  3. kadoudal

    kadoudal Regular Pleskian

    27
    23%
    Joined:
    Nov 20, 2007
    Messages:
    244
    Likes Received:
    0
    Hi Stub

    This is what I am doing for a while ... using subversion for project code management, I deploy easily all my apps using webistrano. Also using Apache/Passenger with sub-uris

    if you need any help... or copy of my dev/deploy processes ... you're welcome
     
  4. kadoudal

    kadoudal Regular Pleskian

    27
    23%
    Joined:
    Nov 20, 2007
    Messages:
    244
    Likes Received:
    0
    Plesk .. Rails ... Apache-Passenger Sub-URI

    # for your information, this is the process I am using with Apache-Passenger
    ssh ftp_username@mydomain.com
    su
    mkdir /var/rails
    chown -R root:www-data /var/rails
    mkdir -p /var/rails/mydomain
    chown -R ftp_username:www-data /var/rails/mydomain
    mkdir -p /var/rails/mydomain/myrailapp
    chown -R ftp_username:www-data /var/rails/mydomain/myrailapp
    # I setup, migrates & deploy the rail app into 'myrailapp' (this creates the releases and current release directory
    # once done, I setup the Plesk vhost
    # I use the URL format : www.mydomain.com/myrailapp (many rails apps in the same domain)
    nano /var/www/vhosts/mydomain.com/conf/vhost.conf
    RailsBaseURI /myrailapp
    <Directory /var/rails/mydomain/myrailapp/current/public >
    # Access control policy
    #... up to you
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order deny,allow
    Deny from all
    Allow from all
    </Directory>

    then we need a link from the Plesk httpdocs
    ln -s /var/rails/mydomain/myrailapp/current/public /var/www/vhosts/mydomain.com/httpdocs/myrailapp
    chown -R ftp_username:psacln /var/www/vhosts/mydomain.com/httpdocs/myrailapp

    /usr/local/psa/admin/sbin/websrvmng -a -v
    /etc/init.d/apache2 force-reload

    and that's it
    hope it can help someone .. (read posts about Plesk & Apache-Passenger
     
  5. paul_h

    paul_h Guest

    0
     
    Hi,

    I am having trouble viewing my rails app. I have read the docs suggested in the previous posts, and would like to know one thing first:
    Do I _have_ to run FastCGI, or am I able to use passenger?

    If I can use passenger then I'll elaborate on the problem, and hopefully someone can help me sort it. If I can't use passenger, I'll have to re-image the server to another OS without plesk.

    Currently have:

    CentOS 5
    Plesk Panels 10
    Ruby 1.9.2 (built from source)
    Rails 3.0.3

    Many Thanks

    Paul
     
  6. paul_h

    paul_h Guest

    0
     
    oops sorry, just noticed this forum was for Plesk 9, found the thread on a google search.

    Will re-post in the Plesk 10 forum.
     
Loading...