Skip to main content

Docker Containers, Apache Vhost, Proxy SubDomains

Comments

9 comments

  • cPRex Jurassic Moderator
    Hey there! I think the first thing we'll need to know is why there is a difference in the WHM versions. Can you run "/usr/local/cpanel/cpanel -V" or check the cPanel & WHM version in the top-right corner of the WHM interface to get us the version details?
    0
  • Pol33li
    Hey there! I think the first thing we'll need to know is why there is a difference in the WHM versions. Can you run "/usr/local/cpanel/cpanel -V" or check the cPanel & WHM version in the top-right corner of the WHM interface to get us the version details?

    92.0 (build 9)
    0
  • cPRex Jurassic Moderator
    Thanks for the details. That is the current stable release so I wouldn't expect that to be different than the documentation. Can you let me know what pages you're referencing and where the confusion starts so I can get you better details?
    0
  • Pol33li
    To start, I'm having to learn WHM's ways of handling the processes of creating a config through a UI, I'm used to the cmd line for doing this. Starting this whole thing over: - Can you point me in the direction of using WHM's panel to create a few subdomains (I'm guessing the DNS zone -> add CNAMEs). Also, I created DNS zones instead of editing the main domain's CNAME, so if you know how to remedy: "No vhosts config data for user "XXXX" at /usr/local/cpanel/Cpanel/Config/WebVhosts.pm line 86." - Can you point me in the direction of the virtualhost config directories that will allow for use of the subdomains as a proxy to docker containers?
    0
  • cPRex Jurassic Moderator
    Great - those questions actually help clear things up on my end too :D In order to create a subdomain you'd actually want to be logged into the cPanel for the account and not the WHM interface. You can get to this area from WHM >> List Accounts and then click the cPanel logo next to the domain you want to work with. You'll likely want to remove any custom DNS records you've created at this point as they'll get recreated when you set up the subdomain through cPanel. Once you're inside cPanel you'll see the "Subdomains" icon and that's where you'll get that created. Performing that work in the interface inside cPanel will also create the vhost and resolve that issue you're seeing. Once that is created you'll have the correct files setup in Apache and DNS for the subdomain to work properly. Instead of editing the configuration directly, which cPanel will overwrite, you'll want to use include files as outlined here: as that will let you modify the specific subdomain on the system. Can you work through that and let me know if that works how you expect?
    0
  • Pol33li
    Was unable to delete the old "subdomains" I accidentally created through WHM's DNS Zone, and cPanel warned me "A DNS entry for the domain 'docs.domain.tld' already exists. at /usr/local/cpanel/Cpanel/Admin/Modules/Cpanel/subdomain.pm line 176." For now I created two new subdomains: d.domain.tld and app-d.domain.tld. I created a .conf file in the ssl directory for d.domain.tld: "/etc/apache2/conf.d/userdata/ssl/2_4/domainuser/d.domain.tld/d.domain.tld.conf" and nothing loads. I tried a default check on the url with a basic index.html to test and nothing there either.
    0
  • cPRex Jurassic Moderator
    Thanks for the additional details. The only thing we'd be able to confirm on our end is that the include is valid and being read properly, which it sounds like it is. The issue here sounds like a problem with the ports and proxying, which isn't something that is included in cPanel by default. If you'd like to open a ticket with our team we could do some additional testing on our end with this, but I can't guarantee we'll be able to get things working properly even if we have access to the system as this isn't a standard configuration option with cPanel tools.
    0
  • Pol33li
    No worry, I will figure it out. I am trying to speed run it and that's never a good thing.
    0
  • Pol33li
    I got it working, all that was needed was this: Cpanel ReverseProxy Traffic to Docker Container " ServerOK I had issues due to our weird DNS config and not cPanel and WHM, apologies. Sorted that out and all is good (plus I learned a lot about cPanel).
    0

Please sign in to leave a comment.