Prevent using ip hostname

Discussion in 'Installation/Configuration' started by Arcadeguy, Nov 5, 2025 at 2:08 AM.

  1. Arcadeguy

    Arcadeguy New Member

    I have a server (sites.xxxxx.com) and I created a site within ISPConfig with that name so that if the default url is used it will go to that site just so it doesn't just show the default apache2 page. The problem is that if using the ip address (i.e. <urlscheme>://123.1.1.2) it shows the same page, but SSL is invalid. Or <scheme>://123.1.12:8080 works as well with broken SSL, which is causing me issues with PCI compliance. Ideally I'd like to just prevent direct IP hostname (even if it was just for the ispconfig site), but every solution I've tried does not work (i.e. Vhost with Ip and rewrite, .htaccess with rewrite). Best I've accomplished is redirecting http -> https.
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Why not simply redirect the IP to your server site? You know you can create a website using that IP then permanently redirect it to your server site, right? Sorry, if this idea is wrong.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Apache shows the first site in alphabetical order that it finds if no better matching site is there. To show a specific site, e.g. a empty placeholder site, all you have to do is to create a site that is first in alphabet. E.g. create a site with domain '000default.tld', the domain does not has to exist, and create a self-signed cert so it also catches requests for https.
     

Share This Page