Default webserver

Discussion in 'Installation/Configuration' started by Samuelet, Jun 7, 2021.

  1. Samuelet

    Samuelet New Member

    Hi,
    i've a problem with my ispconfig multiserver installation.
    I added a second, updated, webserver and i need it becames the default choice for my clients when a new site is created.
    There are "limit templates" applied to these clients.
    Unfortunately, setting the "Defalt Webserver" in the "Main Config" does nothing, so the old webserver is always the default choice.
    Is it a bug?
     
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    add that new webserver to the relevant limit template as well.
    if the webserver isn't listed as an available webserver in their limit template then they're not allowed to create a website on that webserver.

    * i don't believe that changes to the limit template need a client resync to apply the change to any already existing clients, but it may be needed.
     
  3. Samuelet

    Samuelet New Member

    Hi,
    the new webserver is already added in the limit template, and this works as expected: clients can create new sites on both servers.
    What i'd like to achieve is to set the webserver default choice to the new server (in the creation form), preventing clients to create sites by default on old server( but let them choose it for particular needs).
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Are you sure you set the correct webserver under the web settings in main config? It works fine here.
     
  5. Samuelet

    Samuelet New Member

    Default Webserver" in the "Main Config" is "webhost2".
    "Web servers" option, in the Limit tab of the Limit Template, contains both "webhost1, webhost2" (this is the displayed order, even if i add first webhost2 and than webhost1).
    From "Clients->Edit client" in Clients tab, i switch from Admin to a client with the above limit template applied.
    When i click "add new website" in the Site tab, the "server" option contains webhost1 while i expected it's webhost2.
     
  6. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    You cannot prevent this. It's due to the nature of the select field where you insert the servers. It always is sorted. The only way to achieve what you want is to manually change the order of "web_servers" in the client template table in the database and then re-apply it to the client.

    Of course this will get lost whenever you change something in the template via UI.
     
    ahrasis likes this.
  7. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    The sorting is not the problem, but the default used for the webserver field when creating a new site ;)
     
  8. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Nope. When creating a new site, the first entry in field "web_servers" is used. And when adding servers to the "web_servers" field via template or client limits, the field is always sorted. So you have no way adding server 2 before server 1. So server 1 will always be first and such always be the selected one on new sites.
     
    ahrasis likes this.
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    This is not the case as admin - so maybe we could change it?
     
  10. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    well that kinda makes the 'default webserver' setting completely redundant then.
     
  11. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Not easily. The default webserver setting (global) might be a server that is not contained in the client limits "web_servers" field. So we cannot use it.

    The default webserver setting (global) is only for default setting when adding templates / clients / sites as admin.

    It's for admin only.
     
  12. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    The only way I can think of to change it would be to force the server select fields inside the client templates and client limits to NOT be sorted but be sortable by admin. The order then should be already respected by everything else.

    But I don't know how easy (or if possible at all) this is with the current select field.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    If I remember correctly, this worked in the past that. The default server was used as server when a client added a new website.
     
  14. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Yes, but that was before multiple servers were allowed, at that time you could only set a single one for each client / limit.

    Now you can make multiple servers available for the client to select from. But what the reporter meant is to define the order in which those are shown in the select (for client) on new site creation.
     
  15. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    maybe the 'default webserver' setting needs to move then? (and 'default database server')
    put it in the limit template, so they can have a list of available webservers, and have a default one selected from within that list if there's more than one server listed.
     
  16. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    That would make it way too complicated. It would be better to respect the user's sorting of the servers selected. If possible.
     
  17. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    fair enough, one question though, where exactly would the client sort the server list?
    they don't generally have access to the client tab, or the limits tab within the client tab. so they can't see the current server list to do any sorting....
     
  18. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    No, I meant the "admin"'s sorting of the available servers field. "User" was misleading.
     
  19. Samuelet

    Samuelet New Member

    Hi thanks for contributions, maybe i could open an issue request for next releases.
    In my case, as best workaround i think i could remove the old webhost on client template, forcing users to add new sites only for the new server.
    I have not yet deeply tested this way, but it seems that the old server is still managed for associated sites, for example i can add and modify ftp/ssh users, cron and databases and change options for those sites.
    The only shortcoming should be that users can't add new sites on old server.
    Do you see any issue about this?
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Removing the old server from client template has no negative effects on existing sites.
     

Share This Page