Load Balancinng Nginx with two vps server

CentOS 6.4:
Debian/Ubuntu:
where server_array is the name of the server group which will be used for the load balancing configuration.
Inside the same file we can "tell" the virtual host to use the server group:
Once ready we can restart the Nginx service:


If you have installed the nginx package from the Ubuntu repositories, you will have two directories.
/etc/nginx/sites-enabled and /etc/nginx/sites-available.
In the main nginx configuration, /etc/nginx/nginx.conf, you have the following line:
include /etc/nginx/sites-enabled/*.conf;
So basically to list all available virtualhosts, you can run the following command:
ls /etc/nginx/sites-available
To activate one of them, run the following command:
ln -s /etc/nginx/sites-available/www.example.org.conf /etc/nginx/sites-enabled/

Comments

Popular posts from this blog

Install Cloud Torrent on Docker

Install Wordpress Using Docker Yml file