Add my domain to a nodebalancer

I have just added a nodebalancer to my setup. Up until now I have a web server (Appce2) and a MYSQl server two linode machines.

I added a private IP to the web server

Created a nodebalancer

added the private IP of the web server to the nodebalancer config.

Changed the AAA record in the domains to the external IP of the Nodebalancer. The balancer is on http only the web server has https redirect to http traffic redirected to https

The balancer reported my server as down and I can't use a browser to connect.

I deleted the private IP from the balancer and changed the aaa back to the public IP of the web server

It only servers pages if my local hosts file has an entry for the domain pointing the webserver public IP

What am I doing wrong?

3 Replies

I have just added a nodebalancer to my setup. Up until now I have a web server (Appce2) and a MYSQl server two linode machines.

If I understand correctly, you've only got a single Linode that works as your web server? In that case, I would suggest rethinking the use of a NodeBalancer. The purpose of the NodeBalancer is to take traffic that reaches the NodeBalancer and spread it across multiple backend Linodes. If you only have a single Linode, there is no balancing being done.

If you should decide to move forward with creating a second Linode to be balanced, then you'll want to take the steps outlined in our Getting Started with NodeBalancers guide.

The balancer is on http only the web server has https redirect to http traffic redirected to https

I'm not quite sure what you mean here, but I'll try and break down the options for HTTP and HTTPS on NodeBalancers.

If you want to use HTTP, you'll set your NodeBalancer to listen on port 80 (or whichever port you want use for HTTP traffic). When you add your backend Linodes, you'll use choose the port that your backends have been configured to receive HTTP traffic. That will ensure all traffic that hits your NodeBalancer's HTTP port is balanced between your backend nodes.

To use HTTPS, you'll repeat the same process, using port 443 (or your chosen HTTPS port). You'll then be prompted for your SSL certificate and your Private Key. After that, add your backend nodes, indicating which port they listen for HTTPS traffic.

After the configuration is complete, you'll want to create an A and AAAA record to point your domain the the NodeBalancer's public IPv4 and IPv6 addresses.

That puts the NodeBalancer in charge, and your traffic should now be balanced.

It only servers pages if my local hosts file has an entry for the domain pointing the webserver public IP

This is going to be related to your web server's configuration. You'll essentially want to build your website as if you are going to be receiving traffic at your Linode's IP address. Once everything is set up and you've chosen what port Apache is configured to, you'll be able to have your NodeBalancer point any traffic it receives to that port.

Hi,

I want 2 web servers, I am trying 100% unsuccessfully to use a Nodebalancer.

If I add an NB with 2 configurations

1) http port 80
2) http3 port 443

set the A/AAAA records to the external IP of the NB the site is dead

The web server is unaware of the NB, the apache2.conf file is

<directory chm="" html="" var="" www=""> Require all granted </directory>

<virtualhost *:80="">
ServerName www.filemyvatreturn.uk
ServerAlias filemyvatreturn.uk
ServerAdmin [email protected]
DocumentRoot /var/www/html/chm/vatlive/public
<directory chm="" html="" var="" vatlive="" www=""> Options Indexes FollowSymLinks Includes ExecCGI Require all granted AllowOverride all </directory></virtualhost>

SetEnv CHMSERVER LINO50

    ErrorLog /var/www/html/chm/vatlive/syslogs/error.log
    CustomLog /var/www/html/chm/vatlive/syslogs/access.log combined

RewriteEngine on
RewriteCond %{SERVER_NAME} =www.filemyvatreturn.uk [OR]
RewriteCond %{SERVER_NAME} =filemyvatreturn.uk [OR]
RewriteCond %{HTTP:X-Forwarded-Proto} !http
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301,NE]
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
LogLevel alert rewrite:trace4

In the nodebalancer definiation page, is says my https config node is down, it isn't I can run the site and ssh to it via putty

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct