Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Ruby on rails with subdomain question

Discussion in 'EasyApache' started by Matthew B Dowell, Jul 7, 2018.

  1. Matthew B Dowell

    Matthew B Dowell Registered

    Joined:
    Jul 7, 2018
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Antonio, TX
    cPanel Access Level:
    Root Administrator
    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
    <VirtualHost *:3000>
    ServerName subdomain.example.com
    ServerAlias www.subdomain.example.com
    DocumentRoot /public_html/ruby_app
    XSendFile On
    XSendFilePath /public_html/ruby_app/public/system
    </VirtualHost>

    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?
    how to add multiple ports for apache + add some custom vhost with easyapache

    Here's documentation I've reviewed:

    Advanced Apache Configuration
    Advanced Apache Configuration - EasyApache - cPanel Documentation

    Modifying Virtualhost Containers with Include Files
    Modify Virtualhost Containers With Include Files - EasyApache - cPanel Documentation

    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
    <VirtualHost *:3000>
    #whatever
    </VirtualHost>

    within this .conf file both result in httpd build errors like ... <VirtualHost> cannot occur within <VirtualHost>

    Apache 2.4 configuring multiple name-based vhosts
    VirtualHost Examples - Apache HTTP Server Version 2.4


    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.
     
  2. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,814
    Likes Received:
    133
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Matthew B Dowell

    Matthew B Dowell Registered

    Joined:
    Jul 7, 2018
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Antonio, TX
    cPanel Access Level:
    Root Administrator
    Thanks for the response, I think I've made some progress based on your feedback.

    I've played around with it. I know I have all the appropriate packages installed, and the "Application Manager" is enabled for cPanel in WHM Feature Manager.

    My Hosting package - a Bluehost VPS/w root access, has some sort of redirect on cPanel so it redirects to their Bluehost "cpanel" interface.
    To get to the FULL cPanel interface, and access Application Manager, I had to go to the "Account List" in WHM and click the cPanel logo link, it takes me to my full cPanel, and I have to then hit the "stop load" button on my browser before the Bluehost interface loads and cripples my options. Fortunately, I can access Application manager from the partially loaded page and it does not seem disabled as far as I know.

    This seems like a very unstable workaround, dealing with a potentially hostile hosting company. Any suggestions that could be done within the VPS server root to regain full control over cPanel? (IE. like hosting a default cPanel under another subdomain or something? Is that even possible?)

    I'll come back in a bit to take a stab at launching my rails app from the Application Manager in the morning.
     
  4. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,814
    Likes Received:
    133
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice