nginx listen on specific interface The Next CEO of Stack Overflowsvn using nginx Commit failed: path not foundNginx proxy pass works for https but not httpnginx load balancer rewrite to listen portnginx proxy redirecting request to different proxyNginx subversion commit failureNginx/Apache: set HSTS only if X-Forwarded-Proto is httpsnginx rewrite throw 404 with last and breakRoute traffic through private IP for only certain hosts - CentOS 6.6nginx reverse proxy hide login query also on 301 redirect or full qualified urlConfigure NGINX : How to handle 500 Error on upstream itself, While Nginx handle other 5xx errors
Apart from "berlinern", do any other German dialects have a corresponding verb?
How to Reset Passwords on Multiple Websites Easily?
Opposite of a diet
WOW air has ceased operation, can I get my tickets refunded?
Is HostGator storing my password in plaintext?
Anatomically Correct Mesopelagic Aves
Why were Madagascar and New Zealand discovered so late?
Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis
Can a caster that cast Polymorph on themselves stop concentrating at any point even if their Int is low?
How to make a software documentation "officially" citable?
Fastest way to shutdown Ubuntu Mate 18.10
How to make a variable always equal to the result of some calculations?
How to use tikz in fbox?
How did people program for Consoles with multiple CPUs?
Anatomically Correct Strange Women In Ponds Distributing Swords
Rotate a column
How do spells that require an ability check vs. the caster's spell save DC work?
Can the Reverse Gravity spell affect the Meteor Swarm spell?
Term for the "extreme-extension" version of a straw man fallacy?
When airplanes disconnect from a tanker during air to air refueling, why do they bank so sharply to the right?
Is a stroke of luck acceptable after a series of unfavorable events?
Unreliable Magic - Is it worth it?
How do we know the LHC results are robust?
What's the point of interval inversion?
nginx listen on specific interface
The Next CEO of Stack Overflowsvn using nginx Commit failed: path not foundNginx proxy pass works for https but not httpnginx load balancer rewrite to listen portnginx proxy redirecting request to different proxyNginx subversion commit failureNginx/Apache: set HSTS only if X-Forwarded-Proto is httpsnginx rewrite throw 404 with last and breakRoute traffic through private IP for only certain hosts - CentOS 6.6nginx reverse proxy hide login query also on 301 redirect or full qualified urlConfigure NGINX : How to handle 500 Error on upstream itself, While Nginx handle other 5xx errors
I'm running a Nginx as a proxy server, forwarding to 10.12.96.4.
I would like the NGINX server to listen on ens3:
, and forward requests through `tun0
Here is my /etc/nginx/sites-available/default
:
server
listen 149.28.239.231:80;
server_name default_server;
location /
proxy_pass http://45.77.185.160:80;
# proxy_pass http://10.12.96.4:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
server
listen 443;
server_name example.com;
ssl_certificate /etc/letsencrypt/live/example.com/cert.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
location /
proxy_pass https://45.77.185.160:443;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
Here's my interface config
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
inet 100.68.26.219/10 brd 100.127.255.255 scope global ens3
inet 149.28.239.231/23 brd 149.28.239.255 scope global ens3:1
inet6 2001:19f0:5:65d3:5400:1ff:fea6:9b5/64 scope global
inet6 fe80::5400:1ff:fea6:9b5/64 scope link
inet 10.8.0.3/24 brd 10.8.0.255 scope global tun0
linux ubuntu nginx routing reverse-proxy
bumped to the homepage by Community♦ 18 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm running a Nginx as a proxy server, forwarding to 10.12.96.4.
I would like the NGINX server to listen on ens3:
, and forward requests through `tun0
Here is my /etc/nginx/sites-available/default
:
server
listen 149.28.239.231:80;
server_name default_server;
location /
proxy_pass http://45.77.185.160:80;
# proxy_pass http://10.12.96.4:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
server
listen 443;
server_name example.com;
ssl_certificate /etc/letsencrypt/live/example.com/cert.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
location /
proxy_pass https://45.77.185.160:443;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
Here's my interface config
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
inet 100.68.26.219/10 brd 100.127.255.255 scope global ens3
inet 149.28.239.231/23 brd 149.28.239.255 scope global ens3:1
inet6 2001:19f0:5:65d3:5400:1ff:fea6:9b5/64 scope global
inet6 fe80::5400:1ff:fea6:9b5/64 scope link
inet 10.8.0.3/24 brd 10.8.0.255 scope global tun0
linux ubuntu nginx routing reverse-proxy
bumped to the homepage by Community♦ 18 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
can you make the interface config neater? And/or addip route
neatly?
– danblack
Sep 11 '18 at 3:53
I'm unsure what the question is. You already know how to bind to IP addresses with thelisten
directive and how to proxy. Aren't you done?
– Halfgaar
Sep 11 '18 at 6:38
add a comment |
I'm running a Nginx as a proxy server, forwarding to 10.12.96.4.
I would like the NGINX server to listen on ens3:
, and forward requests through `tun0
Here is my /etc/nginx/sites-available/default
:
server
listen 149.28.239.231:80;
server_name default_server;
location /
proxy_pass http://45.77.185.160:80;
# proxy_pass http://10.12.96.4:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
server
listen 443;
server_name example.com;
ssl_certificate /etc/letsencrypt/live/example.com/cert.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
location /
proxy_pass https://45.77.185.160:443;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
Here's my interface config
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
inet 100.68.26.219/10 brd 100.127.255.255 scope global ens3
inet 149.28.239.231/23 brd 149.28.239.255 scope global ens3:1
inet6 2001:19f0:5:65d3:5400:1ff:fea6:9b5/64 scope global
inet6 fe80::5400:1ff:fea6:9b5/64 scope link
inet 10.8.0.3/24 brd 10.8.0.255 scope global tun0
linux ubuntu nginx routing reverse-proxy
I'm running a Nginx as a proxy server, forwarding to 10.12.96.4.
I would like the NGINX server to listen on ens3:
, and forward requests through `tun0
Here is my /etc/nginx/sites-available/default
:
server
listen 149.28.239.231:80;
server_name default_server;
location /
proxy_pass http://45.77.185.160:80;
# proxy_pass http://10.12.96.4:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
server
listen 443;
server_name example.com;
ssl_certificate /etc/letsencrypt/live/example.com/cert.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
location /
proxy_pass https://45.77.185.160:443;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
Here's my interface config
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
inet 100.68.26.219/10 brd 100.127.255.255 scope global ens3
inet 149.28.239.231/23 brd 149.28.239.255 scope global ens3:1
inet6 2001:19f0:5:65d3:5400:1ff:fea6:9b5/64 scope global
inet6 fe80::5400:1ff:fea6:9b5/64 scope link
inet 10.8.0.3/24 brd 10.8.0.255 scope global tun0
linux ubuntu nginx routing reverse-proxy
linux ubuntu nginx routing reverse-proxy
edited Sep 11 '18 at 6:22
Gerald Schneider
6,56022646
6,56022646
asked Sep 11 '18 at 3:42
IanArmanIanArman
1316
1316
bumped to the homepage by Community♦ 18 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 18 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
can you make the interface config neater? And/or addip route
neatly?
– danblack
Sep 11 '18 at 3:53
I'm unsure what the question is. You already know how to bind to IP addresses with thelisten
directive and how to proxy. Aren't you done?
– Halfgaar
Sep 11 '18 at 6:38
add a comment |
can you make the interface config neater? And/or addip route
neatly?
– danblack
Sep 11 '18 at 3:53
I'm unsure what the question is. You already know how to bind to IP addresses with thelisten
directive and how to proxy. Aren't you done?
– Halfgaar
Sep 11 '18 at 6:38
can you make the interface config neater? And/or add
ip route
neatly?– danblack
Sep 11 '18 at 3:53
can you make the interface config neater? And/or add
ip route
neatly?– danblack
Sep 11 '18 at 3:53
I'm unsure what the question is. You already know how to bind to IP addresses with the
listen
directive and how to proxy. Aren't you done?– Halfgaar
Sep 11 '18 at 6:38
I'm unsure what the question is. You already know how to bind to IP addresses with the
listen
directive and how to proxy. Aren't you done?– Halfgaar
Sep 11 '18 at 6:38
add a comment |
2 Answers
2
active
oldest
votes
This has been answered. It's not possible to bind to an interface because nginx has no concept of layer2/3. Use static IPs, or wrapper scripts which monitor dynamic IPs, write new .confs and zero-downtime restart as needed.
https://stackoverflow.com/q/39536714/246672
add a comment |
You can bind to the network address of the interface in question.
Based on your interface config, your listen config would look like:
listen 149.28.238.0:80;
I'm in the process of setting up an active/active HA cluster, and need this to work. My test config is below.
[root@b7311458cb35 nginx_plus]# cat /etc/nginx/sites-enabled/docker-test.local.conf
# MANAGED BY PUPPET
server
listen 172.17.0.0:80;
server_name docker-test.local;
status_zone docker-test;
index index.html index.htm index.php;
access_log /var/log/nginx/docker-test.local.access.log combined;
error_log /var/log/nginx/docker-test.local.error.log;
location /
proxy_pass http://docker-test;
proxy_read_timeout 90s;
proxy_connect_timeout 90s;
proxy_send_timeout 90s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Proxy "";
My network details
[root@b7311458cb35 nginx_plus]# ip route
default via 172.17.0.1 dev eth0
172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.4
Testing the config:
[root@b7311458cb35 nginx_plus]# curl http://172.17.0.4:80/ | head -5
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 612 100 612 0 0 101k 0 --:--:-- --:--:-- --:--:-- 119k
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
After reviewing my nginx configuration, I noticed that the default server was still listening on the 172.17.04 IP address, which allowed the curl to work. I'm now following the setup on hexadix.com/ha-proxy-using-vip-keepalived for getting the floating IP address to work. In regards to the outbound address, there is a proxy_bind attribute that can be used to specify an interface via IP address. docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/…
– MarkBarry
Feb 25 at 4:43
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f930345%2fnginx-listen-on-specific-interface%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
This has been answered. It's not possible to bind to an interface because nginx has no concept of layer2/3. Use static IPs, or wrapper scripts which monitor dynamic IPs, write new .confs and zero-downtime restart as needed.
https://stackoverflow.com/q/39536714/246672
add a comment |
This has been answered. It's not possible to bind to an interface because nginx has no concept of layer2/3. Use static IPs, or wrapper scripts which monitor dynamic IPs, write new .confs and zero-downtime restart as needed.
https://stackoverflow.com/q/39536714/246672
add a comment |
This has been answered. It's not possible to bind to an interface because nginx has no concept of layer2/3. Use static IPs, or wrapper scripts which monitor dynamic IPs, write new .confs and zero-downtime restart as needed.
https://stackoverflow.com/q/39536714/246672
This has been answered. It's not possible to bind to an interface because nginx has no concept of layer2/3. Use static IPs, or wrapper scripts which monitor dynamic IPs, write new .confs and zero-downtime restart as needed.
https://stackoverflow.com/q/39536714/246672
answered Sep 11 '18 at 6:44
BarryBarry
1,1821810
1,1821810
add a comment |
add a comment |
You can bind to the network address of the interface in question.
Based on your interface config, your listen config would look like:
listen 149.28.238.0:80;
I'm in the process of setting up an active/active HA cluster, and need this to work. My test config is below.
[root@b7311458cb35 nginx_plus]# cat /etc/nginx/sites-enabled/docker-test.local.conf
# MANAGED BY PUPPET
server
listen 172.17.0.0:80;
server_name docker-test.local;
status_zone docker-test;
index index.html index.htm index.php;
access_log /var/log/nginx/docker-test.local.access.log combined;
error_log /var/log/nginx/docker-test.local.error.log;
location /
proxy_pass http://docker-test;
proxy_read_timeout 90s;
proxy_connect_timeout 90s;
proxy_send_timeout 90s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Proxy "";
My network details
[root@b7311458cb35 nginx_plus]# ip route
default via 172.17.0.1 dev eth0
172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.4
Testing the config:
[root@b7311458cb35 nginx_plus]# curl http://172.17.0.4:80/ | head -5
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 612 100 612 0 0 101k 0 --:--:-- --:--:-- --:--:-- 119k
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
After reviewing my nginx configuration, I noticed that the default server was still listening on the 172.17.04 IP address, which allowed the curl to work. I'm now following the setup on hexadix.com/ha-proxy-using-vip-keepalived for getting the floating IP address to work. In regards to the outbound address, there is a proxy_bind attribute that can be used to specify an interface via IP address. docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/…
– MarkBarry
Feb 25 at 4:43
add a comment |
You can bind to the network address of the interface in question.
Based on your interface config, your listen config would look like:
listen 149.28.238.0:80;
I'm in the process of setting up an active/active HA cluster, and need this to work. My test config is below.
[root@b7311458cb35 nginx_plus]# cat /etc/nginx/sites-enabled/docker-test.local.conf
# MANAGED BY PUPPET
server
listen 172.17.0.0:80;
server_name docker-test.local;
status_zone docker-test;
index index.html index.htm index.php;
access_log /var/log/nginx/docker-test.local.access.log combined;
error_log /var/log/nginx/docker-test.local.error.log;
location /
proxy_pass http://docker-test;
proxy_read_timeout 90s;
proxy_connect_timeout 90s;
proxy_send_timeout 90s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Proxy "";
My network details
[root@b7311458cb35 nginx_plus]# ip route
default via 172.17.0.1 dev eth0
172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.4
Testing the config:
[root@b7311458cb35 nginx_plus]# curl http://172.17.0.4:80/ | head -5
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 612 100 612 0 0 101k 0 --:--:-- --:--:-- --:--:-- 119k
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
After reviewing my nginx configuration, I noticed that the default server was still listening on the 172.17.04 IP address, which allowed the curl to work. I'm now following the setup on hexadix.com/ha-proxy-using-vip-keepalived for getting the floating IP address to work. In regards to the outbound address, there is a proxy_bind attribute that can be used to specify an interface via IP address. docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/…
– MarkBarry
Feb 25 at 4:43
add a comment |
You can bind to the network address of the interface in question.
Based on your interface config, your listen config would look like:
listen 149.28.238.0:80;
I'm in the process of setting up an active/active HA cluster, and need this to work. My test config is below.
[root@b7311458cb35 nginx_plus]# cat /etc/nginx/sites-enabled/docker-test.local.conf
# MANAGED BY PUPPET
server
listen 172.17.0.0:80;
server_name docker-test.local;
status_zone docker-test;
index index.html index.htm index.php;
access_log /var/log/nginx/docker-test.local.access.log combined;
error_log /var/log/nginx/docker-test.local.error.log;
location /
proxy_pass http://docker-test;
proxy_read_timeout 90s;
proxy_connect_timeout 90s;
proxy_send_timeout 90s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Proxy "";
My network details
[root@b7311458cb35 nginx_plus]# ip route
default via 172.17.0.1 dev eth0
172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.4
Testing the config:
[root@b7311458cb35 nginx_plus]# curl http://172.17.0.4:80/ | head -5
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 612 100 612 0 0 101k 0 --:--:-- --:--:-- --:--:-- 119k
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
You can bind to the network address of the interface in question.
Based on your interface config, your listen config would look like:
listen 149.28.238.0:80;
I'm in the process of setting up an active/active HA cluster, and need this to work. My test config is below.
[root@b7311458cb35 nginx_plus]# cat /etc/nginx/sites-enabled/docker-test.local.conf
# MANAGED BY PUPPET
server
listen 172.17.0.0:80;
server_name docker-test.local;
status_zone docker-test;
index index.html index.htm index.php;
access_log /var/log/nginx/docker-test.local.access.log combined;
error_log /var/log/nginx/docker-test.local.error.log;
location /
proxy_pass http://docker-test;
proxy_read_timeout 90s;
proxy_connect_timeout 90s;
proxy_send_timeout 90s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Proxy "";
My network details
[root@b7311458cb35 nginx_plus]# ip route
default via 172.17.0.1 dev eth0
172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.4
Testing the config:
[root@b7311458cb35 nginx_plus]# curl http://172.17.0.4:80/ | head -5
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 612 100 612 0 0 101k 0 --:--:-- --:--:-- --:--:-- 119k
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
answered Feb 22 at 12:14
MarkBarryMarkBarry
1
1
After reviewing my nginx configuration, I noticed that the default server was still listening on the 172.17.04 IP address, which allowed the curl to work. I'm now following the setup on hexadix.com/ha-proxy-using-vip-keepalived for getting the floating IP address to work. In regards to the outbound address, there is a proxy_bind attribute that can be used to specify an interface via IP address. docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/…
– MarkBarry
Feb 25 at 4:43
add a comment |
After reviewing my nginx configuration, I noticed that the default server was still listening on the 172.17.04 IP address, which allowed the curl to work. I'm now following the setup on hexadix.com/ha-proxy-using-vip-keepalived for getting the floating IP address to work. In regards to the outbound address, there is a proxy_bind attribute that can be used to specify an interface via IP address. docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/…
– MarkBarry
Feb 25 at 4:43
After reviewing my nginx configuration, I noticed that the default server was still listening on the 172.17.04 IP address, which allowed the curl to work. I'm now following the setup on hexadix.com/ha-proxy-using-vip-keepalived for getting the floating IP address to work. In regards to the outbound address, there is a proxy_bind attribute that can be used to specify an interface via IP address. docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/…
– MarkBarry
Feb 25 at 4:43
After reviewing my nginx configuration, I noticed that the default server was still listening on the 172.17.04 IP address, which allowed the curl to work. I'm now following the setup on hexadix.com/ha-proxy-using-vip-keepalived for getting the floating IP address to work. In regards to the outbound address, there is a proxy_bind attribute that can be used to specify an interface via IP address. docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/…
– MarkBarry
Feb 25 at 4:43
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f930345%2fnginx-listen-on-specific-interface%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
can you make the interface config neater? And/or add
ip route
neatly?– danblack
Sep 11 '18 at 3:53
I'm unsure what the question is. You already know how to bind to IP addresses with the
listen
directive and how to proxy. Aren't you done?– Halfgaar
Sep 11 '18 at 6:38