Sometimes we will need to automate file copying between our servers. For example, our shell script might need to copy the backup from time to time and we don’t want to provide the password in the clean text format. So what we can do about this?
MySQL master-slave replication is well covered so I won’t go deep into explanations and details. This supposes to be a simple how-to tutorial. However, I’m going to pinpoint a few details that might lead you astray while doing this easy setup.
When you enter the field of multiple MySQL instances on one physical server you might run into the trouble. Lack of documentation, cryptic bugs, and insane settings is something you need to get used to. I almost quit a few times in the process and only my habit of trying unusual things when everything logical failed kept me up to the solution.
There are many reasons for BIND server not to work. BIND is quite old and stable open source project so if it doesn’t work it’s usually something related to configuration and less likely something due to the compilation, installation or bug in the package. Also, there are more than few uses of BIND server so configurations can vary from one use case to another.
There are some situations when you need to check size of directories on your Linux server. Usually it’s due to logging which can consume your hard disk, especially if you have heavy traffic web site or if you log some common type events. Log rotation can help but you need to configure it properly according to your hard disk size.
This tutorial will be quite short because the procedure for adding IP addresses is almost the same for all Linux distributions and it’s easy. However I must mention that I tested this on Ubuntu 16.04.
It’s not always easy or possible to setup port forwarding so you can access your home PC or any other device through public IP your internet service assigns you. Problem is also if your ISP rotate IPs so you always need to keep track of it. One option is to try to convince ISP to give you static IP but traffic routing on ISP side can be also behind NAT, which might be complicated to configure and guys from ISP tend to tell you forwarding is not possible.
So what can you do about that? Sometimes nothing. 🙂
Actually I won’t get into details with Varnish and Nginx configuration because it really depends on your particular case. But it should be pretty straight forward as installing default packages:
apt install varnish
apt install nginx
I’m using port 443 for SSL services, so Haproxy is using this one. It also uses http port 80 and redirect that to https. Everybody knows that Haproxy is stable and quick in jobs it does and that’s load balancing and proxying traffic. I our case we are going to use it for SSL termination and forward traffic to Varnish which is going to occupy port 6081 (default). And Nginx will use port 8080 because it’s final destination in our setup. Varnish should cache most of the web content and hopefully put our dedicated server’s CPU at ease most of the time and leverage quite slow CPU to large amount of RAM (128GB).
In case of traffic increase we can easily balance our traffic to other servers behind Varnish, because Varnish can play load balancing role as well.
So you’re trying to install Hitch for SSL termination on your Ubuntu 16.04 server? Or you might think it’s good idea because you have it working on some other Linux distribution like CentOS?
Think again. After 3-4 spent hours I found solution, installed some other SSL terminator. 😉 (Haproxy). This is where you can return to Google to look for other site if you’are looking for how to tutorial on Hitch with Ubuntu. However you might continue reading to see what kind of mess you might encounter.