Learn about Centmin Mod LEMP Stack today
Become a Member

VPS with Multiple IP Question

Discussion in 'Install & Upgrades or Pre-Install Questions' started by xaitmi, Dec 13, 2015.

  1. xaitmi

    xaitmi Member

    35
    3
    8
    Jan 18, 2015
    Ratings:
    +3
    Local Time:
    4:35 AM
    Hi.

    I have a BuyVM VPS with 2 IPs.

    1 IP is Regular IP
    1 IP is DDOS Protected IP.

    I installed CentMinMod successfully.

    I edited my domains vhost for it to listen on the DDOS Protected IP.

    When I enter my regular IP in my browser it still connects to the webserver.

    How can I make it so that the webserver only runs on the filtered IP.

    I am only going to use my regular IP to ssh into the box.

    Thanks

    Edit: I did some research and came across this

    configure nginx to listen on single ip address - WebHostingNeeds.com

    It looks like what I am looking for.


    But I'm not sure which nginx.conf to edit

    I ran: "locate nginx.conf" on my server and found these.

    /svr-setup/nginx-1.9.9/conf/nginx.conf
    /usr/local/nginx/conf/nginx.conf
    /usr/local/nginx/conf/nginx.conf.default
    /usr/local/src/centminmod/config/nginx/nginx.conf
     
    Last edited: Dec 13, 2015
  2. rdan

    rdan Premium Member Premium Member

    4,195
    1,014
    113
    May 25, 2014
    Ratings:
    +1,438
    Local Time:
    4:35 PM
    Mainline
    10.2
    Edit this.
    And your domain vhost on /usr/local/nginx/conf/conf.d/
     
  3. xaitmi

    xaitmi Member

    35
    3
    8
    Jan 18, 2015
    Ratings:
    +3
    Local Time:
    4:35 AM
    In
    /usr/local/nginx/conf/nginx.conf
    it does not say listen 80 anywhere.

    should I just add listen myip:80 to the top of the file?
     
  4. eva2000

    eva2000 Administrator Staff Member

    34,615
    7,653
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,771
    Local Time:
    6:35 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
..