Report this

What is the reason for this report?

How can I bind a process to a floating IP?

Posted on August 22, 2018

How can I bind a process(i.e. Web server) to a floating IP address? I want to configure NGINX to listen only on the floating IP. However, Ubuntu doesn’t detect the floating IP at all, and NGINX gives an error whenever I try:

nginx: [emerg] bind() to floating_ip:443 failed (99: Cannot assign requested address)

The config I’m using is:

    server{
        listen floating_ip:443 ssl;
        ssl_certificate /var/www/.acme.sh/domain_name.com/fullchain.cer;
        ssl_certificate_key /var/www/.acme.sh/domain_name.com/domain_name.com.key;
        location /{
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
            #proxy_set_header scheme $scheme;
            proxy_set_header X_FORWARDED_PROTO $scheme;
            proxy_pass http://127.0.0.1:80;
        }
    }

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.