Multi web-server and multi mailserver setup

Discussion in 'Installation/Configuration' started by ispcomm, Jan 21, 2013.

  1. ispcomm

    ispcomm Member


    I have a question I wonder about ispconfig: Is it possible to install a cluster of two or more webservers and two or more mailservers ?

    I want to be able to have an nginx and apache servers running on different physical servers and direct certain sites to the nginx web server while others to the apache webserver.

    For similar reasons I'd like to be able to host mailboxes on two or more servers for space and load balancing purposes.

    I cannot see similar setups in the ispconfig "perfect setups".

    Thank you
  2. kendel

    kendel New Member

    Yes it is possible you can have ISPConfig pick the webserver... but there are 2 problems you will be faced with. One is the FTP, the the other is having the DNS records point to the right web server.

    Now the second can be solved easily by using a ReverseProxy (in which if you router is forwarding port 80 to the first webserver, then you add information of domains located on the second webserver using the ReverseProxy feature).

    So the idea is you use the first webserver as a base and domains located on the second webserver are being proxied through the first.

    As for the ftp, I would be unable to tell you how to split that kind of traffic, I am sure there is a way (maybe even use the same method by defining records in the DNS then defining proxy of those records to the right server)
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, thats possible.

    Thats possible as well.

    Thats also possible.

    The guides are available on See here:

    Just combine the two guides.

    Regarding kendels post: A proxy is only required if your servers dont have external IP addresses. If all servers are reachable over the internet, then you have to point the dns records for the apache sites to the apache server and the nginx sites to the nginx server without needing any kind of proxy.
  4. ispcomm

    ispcomm Member

    So, I must install a first server running all services and then configure one or more slave servers for the specific services (web/mail) and connect them to the master server.

    The first server will be running the ispconfig panel while the others will only have required services only.

    is this correct?
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    If the first server shall provide only the controlpanel and no services, then you you dont have to install all services on it. For a controlpanel only server you need just mysql, php and apache and fail2ban.
  6. ispcomm

    ispcomm Member

    Ok, I think I'm getting the basic idea. You install the services and then use ispconfig to configure them. There are 2 options for a server: Being stand-alone and being a slave to some other server.

    When a server is a slave it mirrors data from it's master (as in DNS primary/secondary server). A slave webserver can be used to HA using haproxy or some other cache (varnish etc).

    When a server is a master, it can be used to install a site for a domain, host a mailserver (postfix+dovecot) and so on.

    I have another question regarding DNS service. Looking at a minimal setup of 2 servers (bare metal with no VM installed) I envision the need to run all services on both servers, where one of them will be running also the ispconfig web interface, while DNS will be shared.

    I agree that the above setup is less than optimal and that a better setup would be using openvz containers to isolate different services talking to each other on a private network while exposing only the bare services outside on a public network.
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Partially correct. But a slave is not nescessarily a mirror.

    The difference between the master and a slave is that the slave has no interface, thats the only difference. So a slave can be a mirror or it can be a server on its own, just managed trough the interface of the master.

    No. A master is the server that runs the ispconfig interface. If the server runs all or no other servivce at all does not matter for the server to be a master.
  8. ispcomm

    ispcomm Member

    I must go forward and buy the Ispconfig book.

    How does secondary dns work? Do you make a mirror dns server for the "main" server or do you add a zone to one server and then add a secondary zone on the second server, pointing to the first one?

    My former confusion was due to the fact that a server is either a slave or a mirror, hence cannot have mixed cases (slave for all except mirror for dns)
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    This are two different method to achieve the same goal. So do either the forst or second method but not both at the same time.

    The ispconfig mirror method is easier as you dont have to take care to create a secondary record and the mirroring is done automatically by ispconfig. The other method with creating a secondary record is more work when you create a new zone but it will work also for primary dns servers that dont run ispconfig as it is a generic BIND zone transfer.

    My recemmendation is to use virtualisation, e.g. have two vm's for dns only and attach these vm's as mirrored slaved to your master server. This has also benefits in security.
  10. ispcomm

    ispcomm Member

    Till, I agree on the virtualisation method. Eats a couple of IP but is much cleaner. I am running MyDNS on my front servers and this has been a solid setup over the years (I guess it saved a lot of trouble during the bind problematic years).

    I do plan to use mydns on both auth servers again. Would you discourage such a setup?

Share This Page