Skip to main content

Default SSL VirtualHost listed at the bottom?

Comments

7 comments

  • cPRex Jurassic Moderator

    Hey there!  Just to make sure we're talking about the same thing, can you let me know which specific page you're viewing this on?

    0
  • rinkleton

    I'm looking at the httpd.conf file.  

    Thanks, as always.

    0
  • cPRex Jurassic Moderator

    Thanks for the additional details.  I don't believe there is ever a guaranteed order that the conf gets built in a certain way, although it seems to pretty much stick to the default.

    However, our docs here say that should be happening as the first vhost:

    https://support.cpanel.net/hc/en-us/articles/1500005458561-How-to-set-the-default-HTTPS-VirtualHost

    On my personal system, this seems to be working as expected and the default is the first vhost.  If you run /scripts/rebuildhttpdconf does that change the order?

    0
  • rinkleton

    I don't think that link is exactly what I'm talking about.  There are two vhosts for /var/www/html (ports 80 and 443).  It looks like these are supposed to server a "default website" generic page.  If both of these were at the top of the list (like the one for port 80, they should override any default account for the server's primary IP.  Since the one for port 443 is at the bottom, it is completely useless.  

    I ran the rebuild script with no change on two separate servers.

    0
  • cPRex Jurassic Moderator

    There should be a few different entries for /var/www/html, but ultimately none of them are going to do what you're looking for and they can't be changed.

    There's the "default vhosts for shared IPs" section which has localhost and the main IP of the server, pointing to the hostname.

    There's the "default vhost for unbound IPs" 

    There's the "cPanel and WHM proxy subdomains" entry.

    You should be using the tool in the link I sent to manually set default vhosts on the server to be the domain of your choosing.  If you do configure things with that tool and things aren't working as you expect, you'll need to create a ticket so we can find out what isn't working properly on your machine.

    I do have case CPANEL-51332 open to make this happen by default on a new system as I think that would provide a much better user experience instead of needing to manually configure this.

    0
  • rinkleton

    I guess one way or another something doesn't seem like it wouldn't work the way you say it should be.  

    If it's the case that the /var/www/html entries should not be used when there isn't a host match for any other vhost, then the one for port 80 at the top of the list is incorrect.  Making a request for a host not listed on any vhost for port 80 does use this entry.  If it shouldn't, this entry should be at the bottom or just not present at all.

    If it's the case that the /var/www/html entries should be used when there isn't a host match for any other vhost, then the one for port 443 is incorrect.  It should be placed above all the other port 443 entries for the default IP.  

    It sounds like you're saying neither of those should be being used?  If that's the case, can you shed some light on why they are there at all?

    0
  • cPRex Jurassic Moderator

    The only one that might be getting used is the "default shared vhost for shared IPs" option, but if you use the details in the guide I sent you it shouldn't have to rely on the /var/www/html entry.

    Ultimately it might be best to create a ticket so we can see this in action.

    0

Please sign in to leave a comment.