Want more timely Centmin Mod News Updates?
Become a Member

Nginx moving server to another IP

Discussion in 'Install & Upgrades or Pre-Install Questions' started by hitman, Nov 1, 2015.

  1. hitman

    hitman Member

    126
    11
    18
    Jul 18, 2014
    Ratings:
    +15
    Local Time:
    8:38 PM
    hello
    can you please let me know of what do i need to change if i move to another IP

    thank you

     
  2. eva2000

    eva2000 Administrator Staff Member

    54,864
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    4:38 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    you need to change or specify a specific listen directive in your site's http and https vhost conf files

    Code:
    server {
      server_name domain.com www.domain.com;
    
    or

    Code:
    server {
      listen 80;
      server_name domain.com www.domain.com;
    
    becomes

    Code:
    server {
      listen IPADDRESSS:80;
      server_name domain.com www.domain.com;
    
    where IPADDRESS is your ip address other than main server IP which is default set if listen directive is not mentioned or an listen directive without an IP address listed

    then restart nginx server

    details outlined at Module ngx_http_core_module