nginx directive not working for "server_name" ? need to add "server_name _;"

Discussion in 'General' started by ledufakademy, Sep 26, 2020.

  1. ledufakademy

    ledufakademy Member

    hello,
    i put this in my Options tab nginx.
    but on server always ... server_name webmail.domain.com; (lets encrypt site etc ...)
    Why ?
    i need (for rainloop) to add other url :webmail.domain.com webmail.domain1.com webmail.domain2.com ;
    or better with : server_name _;
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    That's to be expected as Nginx does not allow overriding of such settings plus server_name is not in a location. Besides that, setting server_name there makes no sense at all and even more, you don't have to set it there. That you tried to set it there shows just that you missed adding the domains and subdomains properly in ISPConfig. Enter the domain or subdomains in the domain field of the site. And if you want to have additional domains or subdomains, add them as alias domains or as subdomains to that website.
     
  3. ledufakademy

    ledufakademy Member

    oups , it's put the directives nginx , server_name webmail.domain.com webmail.domain1.com webmail.domain2.com ;
    ...at the end of the file , but there is also the first one at the begining of the file :
    server_name webmail.domain.com;

    Can we change that ? is it woking with two directives ?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    No

    No, I explained that above plus I explained what you have to do instead. Remove that line from nginx directives field and then add the domains as subdomains or alias domains to that website.
     
  5. ledufakademy

    ledufakademy Member

    ok i see.
    yhe thing i do :
    create a website webmail.domain2.com ; get LE cert ...
    then use REdirect from webmail.domain2.com to webmail.domain.com (rainloop site for all client domain)
    [aim = do not install many instance of rainloop for each client ;-]
     
  6. ledufakademy

    ledufakademy Member

  7. ledufakademy

    ledufakademy Member

    ok ok , lol. let me understand .
    so i can delete websites : webmail.domain1.com
    then :
    just add alias to webmail.domain.com ?
    that's it ?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    No, completely wrong and not what I explained above. Delete the website "webmail.domain2.com" that you've added. Then click on "Aliasdomain" in ISPConfig, enter "webmail.domain2.com" in the domain field, select "webmail.domain.com" in the website field, press save, that's all. And do NOT set anything in the redirect settings.
     
    ledufakademy likes this.
  9. ledufakademy

    ledufakademy Member

    i m completly lost ... sorry
     
  10. ledufakademy

    ledufakademy Member

    ok , thank you for being so patient ...
    one more thing : i have a dns record webmail.domain2.com ..., (in domain2.com dns zone) , i must redirect it to webmail.dom.com ? (cname)
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    I've explained twice what you should do, I explained it even step by step inc. which fields you have to fill in and which button to press. Scroll up, reap the posts again, especially post #8, and do this time what I've suggested instead of doing other things that were nowhere described in this thread.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    No, at leat not when both domains use the same IP. If they don't use the same IP, change IP for webmail.domain2.com. Please just do what I explained.
     
  13. ledufakademy

    ledufakademy Member

    ok it's seem to work, thank you.

    webmail.domain.com (main site hosting rainloop for all others clients domains)
    webmail.domain2.com , an example client needed webmail.

    What i ve done.
    1. in domain2.com zone i had a CNAME webmail.domain2.com => webmail.domain.com (wait for DNS propagate time ...10 - 15 mn)
    2. follow till advice, so :
      - create AliasDomain,
      - Domain : webmail.domain2.com
      - Parent WebsiteDomain: webmail.domain.com
      - Auto-Subdomain: none
      - ... default for all other settings.
     
  14. ledufakademy

    ledufakademy Member

    thank you till, just perfect , that's what we need !
     
  15. ledufakademy

    ledufakademy Member

    there is an issue when i'm trying to add another alias website ... it's break my main site (rainloop) let's encrypt CERT : does someone encounter the same problem ?
    log are:



     
    Last edited: Dec 4, 2020
  16. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What is in renewal config file?
    Does webmail.domain.org resolve from name service and point to that host?
    If you now have same problem as in #1, does reading this thread again from the beginning help?
     

Share This Page