I have a dedicated DirectAdmin server running on CentOS and what worked for me is the following:
(Please note I make assumption you have default DA config setup with Apache/MySQL)
1. Install Ruby, and Rails gem
2. Install passenger:
gem install passenger --pre
3. Install apache server module:
passenger-install-apache2-module
4. Read the output from (3) and add necessary to your /etc/httpd/conf/httpd.conf. It will ask you to add few modules.
5. Create Rails app in some directory (ie. /home/SOME_USER/rails_app). This means: PROD config/database.yml has mysql config filled out, gem 'mysql2' is installed, bundle install, RAILS_ENV=production bundle exec rake db:migrate, etc.
6. Modify respective /usr/local/directadmin/data/users/SOME_USER/httpd.conf as per instructions from point (3):
- change path within <Directory ..... > to point to /home/SOME_USER/rails_app/public and add these two conditions:
AllowOverride all
Options -MultiViews
- change DocumentRoot to point to /home/SOME_USER/rails_app/public
7. Restart Apache, and you are all set. You can now access your
domain.com and your app is running. Steps 1-4 are one time setup only. Steps 5-7 when you want to run additional apps. Google for additional config / tuning.
Hopefully this helps,
Kamil