Setup only mail domain without website

Discussion in 'Installation/Configuration' started by Poliman, Mar 27, 2018.

  1. Poliman

    Poliman Member

    What will show in browser if I set under ISP only Email domain and some email account + default dns zone (using wizard) without create any site in Sites tab?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This depends on where you point the IP address of the domain in dns as the webserver of a domain does not has to be the same server than the mail server. If it points to the same server, then the default vhost (or first vhost) of the system will show up.
     
  3. Poliman

    Poliman Member

    In created dns zone I have A record points to IP of my server where is ISP. But in /var/www/ I haven't any directory related to this domain. This same in /etc/apache2/sites-enabled - no .vhost file. In this case probably first site will show, so I have to create vhost for it.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    As mentioned above, in this case, the default vhost or first vhost will get shown by apache.
     
    Poliman likes this.
  5. Poliman

    Poliman Member

    Exactly. Could you tell me how avoid showing first vhost (would be better to show default vhost or ISP vhost)? I have this same problem when some site lost LE SSL cert (due to some renewal problems). Then I have to add exception in browser and then first vhost appears in browser.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The solution is to create a vhost that is always first. Add a new website with domain name 000default.tld which will works as default / catchall vhost then.
     
  7. Poliman

    Poliman Member

    Always first on the list of websites, right? Is it possible to create some redirection to - for example - ISP main page? Now I am thinking about something like:
    1. Create some catchall vhost. Should it be real domain with dns zone?
    2. From this vhost setup redirect 301 to ISP main page.

    Btw this solution is also for sites which lost theirs LE SSL certs and browser redirect them to first vhost?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    You can do in that vhost whatever you want. If you want to redirect from there to another website or URL, then add a redirect in that site.
     
  9. Poliman

    Poliman Member

    Should it be real domain with dns zone? Btw this solution is also for sites which lost theirs LE SSL certs and browser redirect them to first vhost?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    The site name must be first when sorted alphabetically, the domain does not has to exist in dns.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    When you enable ssl in that site, yes. But of course, the user will get an ssl error.
     
  12. Poliman

    Poliman Member

    I mean not enable ssl for this specific site under non-existent domain. Problem is with LE SSL due to renewal problems for few another sites. In result cert of course expire, then browser shows information about add exception and after adding exception browser shows first vhost. I would like to avoid it. And I asked about this solution would work in this case. :)
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to enable SSL for this site and create a self-signed cert as the domain does not exist. It can't catch requests on port 443 (SSL) otherwise.
     
  14. Poliman

    Poliman Member

    Is it possible under ISP or manually in console - how to do this properly? Besides is it possible to avoid redirection to first vhost or just avoid any redirection if some site will lose ssl cert?
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    In ISPConfig, ssl tab of the website.

    Not in as far as I know, this is a behavior build into apache and nginx and not ISPConfig.
     
  16. Poliman

    Poliman Member

    SSL tab require put some information:
    "SSL Action: Create certificate" is only one field which need to be filled?
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    Detailed step by step instructions that show you how to create a self-signed SSL certificate can be found in the ISPConfig manual.
     
    Poliman likes this.
  18. Poliman

    Poliman Member

    Thank you Till. I have docs for 3.0.5 ISP. Maybe there will be some information.
     
  19. Poliman

    Poliman Member

    Hmm, honestly I am not sure it's default behavior of apache/nginx. Please check ogdolls.pl and then check https://ogdolls.pl. In first case website will open without problem. In second case website will not open, browser will throw some information about "bad ssl certificate" and will ask about add exception. After adding exepction in browser you will see https://ogdolls.pl but without green padlock, because it's not trusted due to add exception. There is no redirection to some another website.
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    The site just uses a wrong ssl cert. The mechanism in the background in Apache is always the same and I described you what this mechanism is. When apache does not find a matching vhost, then it will use the first best matching vhost on that IP, this can indeed be the same website, so what you posted is not unusual nor does it collide with the explanation that I have given.
     

Share This Page