Adding extra ip to the server?

  • Hi, I want to add another ip to my server, my plan would be to add an ip address to be able to allocate new domains on that hosting.


    I'd like to know what kind of data is expected on the fields domain and alias. This is what I thought
    .- domain -> either the domain i plan to allocate on this ip (for example if someone needs ssl) or pointer to the server.
    .- alias -> this is more like a description


    Looking at the code I see that there are validations for the alias as if it was a domain. What is i-mscp expecting?


    You can see attached the error I'm receiving

    Files

    • ipmanage.png

      (30.29 kB, downloaded 94 times, last: )
  • hi,


    same for me, i think is a bug[hr]



    Alias don't accept "." only alphanumeric

    Debian 6 with proxmox 2 - OpenVZ - KVM
    I-mscp 1.0.3.0 migrate from ispcp 1.0.7
    dovecot + zarafa + z-push + maia mail guard + apacheITK

    Edited once, last by krok ().



  • alias is like in the /etc/hosts file


    Code
    1. 192.168.5.106 i-mscp.net www


    www is the alias

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • /var/www/imscp/gui/public/admin/ip_manage.php :


    [code=php]
    if(!iMSCP_Validate::getInstance()->hostname(idn_to_ascii($alias), array('allow' => Zend_Validate_Hostname::ALLOW_LOCAL)) ||
    strpos($alias, '.') !== false) {
    set_page_message('Wrong alias syntax.', 'error');
    $errFieldsStack[] = 'alias';
    } elseif($stmt->fields['isAssignedAlias']) {
    set_page_message(tr('Alias already assigned to another IP address.'), 'error');
    $errFieldsStack[] = 'alias';
    }
    [/php]


    strpos($alias, '.') !== false -> Wrong ?

    Debian 6 with proxmox 2 - OpenVZ - KVM
    I-mscp 1.0.3.0 migrate from ispcp 1.0.7
    dovecot + zarafa + z-push + maia mail guard + apacheITK

  • alias is like in the /etc/hosts file


    Code
    1. 192.168.5.106 i-mscp.net www


    www is the alias


    If the alias is like a subdomain, why it has to be mandatory? In my case I use de control panel directly with a subdomain. For example:


    1) My domain is example.com
    2) I create a dns entry pointing to the server called server1.example.com (using external dns server)
    3) I install i-mscp on the server using server1.example.com for everything
    4) I'd like to add an extra ip address called server2.example.com to that server and I don't need any special extra subdomain.



    In the original ip address, both the domain and the alias are server1.example.com on my server, and it never gave me any problem..
    I'd suggest making the alias optional and calling that field something that 'extra subdomain' or 'subdomain'


    What do you think about it?

  • This topic make me laught!
    Who is asking questions here should have a lesson on DNS Server vs Apache Server.


    an alias is needed on the server to show the prefix of the domain.


    server1.example.com
    http://www.example.com
    server2.example.com


    server1, www and server2 are alias of the domain example.com. If you have 3 diferente pages (aka website) on every prefix, it's the alias that will separate them. If you want to point server2.example.com to show the page in serve1.example.com, you have to configure the alias to do that.


    Note: DNS handle the name resolution to the machine, but it's apache alias that will show the correct page to the client.
    Note2: as for aseques, your example work ok if server1.example.com is the 1st domain created in the server... If you create for the 1st domain host/alias in server http://www.somedomain.com and then you the create the correct domain to handle the server itself, configuring external DNS to point to the IP without configuring anything in the box will point always to http://www.somedomain.com, You can test this: create a temporary domain and point it to the IP address. The domain will show your first domain configured in apache.

    Edited once, last by xclanet ().

  • @xclanet : the problem is ip_manager don't accept "." so you don't enter alias like this : xxxxx.com or yyyy.xxxx.com


    i think is a bug see my before post with php code.


    i have test without strpos($alias, '.') !== false) and it works.

    Debian 6 with proxmox 2 - OpenVZ - KVM
    I-mscp 1.0.3.0 migrate from ispcp 1.0.7
    dovecot + zarafa + z-push + maia mail guard + apacheITK


  • I know how dns work, I've been managing dns servers for years, you sould read what I said in the first post.
    I don't care about the names that are set to the ip address, because the domains that will point to that ip will be created later (with their corresponding apache virtualhost) from the control panel.


    Quote

    an alias is needed on the server to show the prefix of the domain.


    I don't care about this too, because my customers will enter through the main control panel (another ip) which is always secured under ssl

  • I read what you said in the 1st post! And i answered you! If you have been managing DNS servers for years you shouldn't be asking that in the 1st place.
    DNS 101: If you manage the DNS externally for solving the external connections, you should have also a internal DNS (on same box) to manage internal too.


    Just tell me, how will your server know what ip's he have? 1st you have to configure the ip addresses, then you can add domains and aliases to it! Is not that hard to understand!


  • I read what you said in the 1st post! And i answered you! If you have been managing DNS servers for years you shouldn't be asking that in the 1st place.



    DNS 101: If you manage the DNS externally for solving the external connections, you should have also a internal DNS (on same box) to manage internal too.


    Just tell me, how will your server know what ip's he have? 1st you have to configure the ip addresses, then you can add domains and aliases to it! Is not that hard to understand!


    That's nice, but it isn't needed for anything in this case, I could add fake names for the ip_address without any problem, and the users I create by using that ip would work without any problem (by using their own domain)


    I manage the dns for the main domain of the server externally.
    And my server doesn't need to know what are all the names that are pointing to it, in case they are not defined in the host file, the server will use 00_master.conf (default page for the control panel) wich is fine to me.