HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Multi web-server and multi mailserver setup (http://www.howtoforge.com/forums/showthread.php?t=60280)

ispcomm 21st January 2013 01:05

Multi web-server and multi mailserver setup
 
Hello,

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
ispcomm

kendel 21st January 2013 02:14

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)

till 21st January 2013 10:29

Quote:

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 ?
Yes, thats possible.

Quote:

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.
Thats possible as well.

Quote:

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


Quote:

I cannot see similar setups in the ispconfig "perfect setups".
The guides are available on ispconfig.org: See here:

http://www.howtoforge.com/multiserve...th-ispconfig-3

http://www.howtoforge.com/installing...th-ispconfig-3

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.

ispcomm 21st January 2013 17:01

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?

till 21st January 2013 17:05

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.

ispcomm 21st January 2013 17:52

Quote:

Originally Posted by till (Post 290974)
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.

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.

till 21st January 2013 19:39

Quote:

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).
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.

Quote:

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.
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.

ispcomm 22nd January 2013 23:58

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)

till 23rd January 2013 08:48

Quote:

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?
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.

Quote:

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)
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.

ispcomm 29th January 2013 00:44

Quote:

Originally Posted by till (Post 291074)
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.

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?


All times are GMT +2. The time now is 10:46.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.