Question
How can I bind a process to a floating IP?
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;
}
}
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
This seems related.