Ruby on rails with subdomain question
I have root access on the following environment:
Bluehost VPS - WHM 70, CentOS 6.1(kvm), Apache2.4(EasyApache4) /SSL enabled
Bluehost cPanel seems to indicate deprecating adding a rails app function, so I'm avoiding using it.
"Application Manager" does not appear to be showing at all in cPanel even though it is marked as enabled in WHM.
What I want to do is host a Ruby on Rails app as a subdomain of my primary domain.
When I run rails server -e development, it begin listening on 0.0.0.0:3000 or localhost:3000: so,
example.com -> php website(Wordpress). xxx.xxx.xxx.xxx:80 (I assuming port 80)
subdomain.example.com -> ruby on rails app. xxx.xxx.xxx.xxx:3000
In the Ubuntu/Apache world, I would simply create a virtualhost config for the ruby app so when users visit subdomain.example.com it loads the ruby on rails app.
Listen 3000
ServerName subdomain.example.com
ServerAlias
DocumentRoot /public_html/ruby_app
XSendFile On
XSendFilePath /public_html/ruby_app/public/system
It seems like WHM/cPanel EasyApache4 has some special approach, that is not obvious to me.
This thread seems to indicate that there's no way of configuring port-specific virtualhosts?
Here's documentation I've reviewed:
Advanced Apache Configuration
Modifying Virtualhost Containers with Include Files
I've been able to include conf changes using the Individual Hosts Instructions for Apache 2.4 (with SSL) -> /usr/local/apache/conf/userdata/ssl/2_4/$user/$domain/$includename.conf
Trying to declare:
Listen 3000
OR
#whatever
within this .conf file both result in httpd build errors like ... cannot occur within
Apache 2.4 configuring multiple name-based vhosts
I've been working on this for 2-days trying to crack this nut. This should IMO be something that is more obvious in the cPanel/WHM world than it seems right now. If anyone could provide some input as to how to finish configuring this thing, I'd appreciate it.
-
Hi @Matthew B Dowell It sounds like you're missing the ea-ruby24-mod_passenger module. That's the only reason I can think of you wouldn't be seeing the application manager rather than it not being included in the featurelist for your package. The documentation here: Application Manager - Version 72 Documentation - cPanel Documentation goes over this. Can you double check that the RPM's are present and that the feature is present in your featurelist? I think it would make the entire process a easier for you as opposed to adding everything manually. Thanks! 0 -
HI @Matthew B Dowell That doesn't sound like a viable workaround - at least not a convenient one. Since you have root access to the server I wonder if their modifications are just a custom theme for cPanel. If you go to WHM>>Account Functions>>Modify An Account is the theme that's listed Paper Lantern or something else? The hard part here is I don't know how they're making their customizations to your panel though if I am correct I believe it's just a theme/style change. Thanks! 0
Please sign in to leave a comment.
Comments
3 comments