Hello
How do I install - loadbalancer + proxystream
I have a safe installation method that does not work with - aapanel please help
Setting up NGINX with the proxy and load balancer.
Input the following command:
Code:
nano /etc/ngnix/ngnix.conf
The following section between lines 57 and 63 will be changes to be careful.
line 61 and 62 change to
Code:
#include /etc/nginx/conf.d/.conf;
#include /etc/nginx/sites-enabled/;
now on line 60 enter the following:
Code:
upstream LoadBalancer {
server 127.0.0.1:6666;
}
upstream ProxyStream {
server 127.0.0.1:6868;
}
server {
listen 80;
server_name proxy.yourdomain.com;
location / {
proxy_pass http://LoadBalancer;
proxy_http_version 1.1;
proxy_send_timeout 600;
proxy_read_timeout 600;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
server {
listen 80;
server_name sv1.yourdomain.com;
location / {
proxy_pass http://ProxyStream;
proxy_http_version 1.1;
proxy_send_timeout 600;
proxy_read_timeout 600;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
change line 70 to the following:
Code:
server_name proxy. INSERT YOUR DOMAIN WITH NO TRAILING /;
change line 86 to the following:
Code:
server_name sv1. INSERT YOUR DOMAIN WITH NO TRAILING /;
and that's it Proxy and Load Balancer are now sorted, you just need to run the following commands to reboot NGINX and Start them.
Code:
service nginx restart
pm2 restart all