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










0















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









share|improve this question
















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 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















0















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









share|improve this question
















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 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













0












0








0








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









share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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

















  • 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
















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










2 Answers
2






active

oldest

votes


















0














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






share|improve this answer






























    0














    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>





    share|improve this answer























    • 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












    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
    );



    );













    draft saved

    draft discarded


















    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









    0














    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






    share|improve this answer



























      0














      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






      share|improve this answer

























        0












        0








        0







        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






        share|improve this answer













        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







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Sep 11 '18 at 6:44









        BarryBarry

        1,1821810




        1,1821810























            0














            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>





            share|improve this answer























            • 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
















            0














            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>





            share|improve this answer























            • 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














            0












            0








            0







            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>





            share|improve this answer













            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>






            share|improve this answer












            share|improve this answer



            share|improve this answer










            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


















            • 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


















            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

            Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

            What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company