Change Website IP (internet IP)

Discussion in 'Installation/Configuration' started by keba, Sep 19, 2012.

  1. keba

    keba New Member

    We have 2 internet IP using different router: router A (LAN IP: 192.168.1.1) router B (192.168.2.1)

    from beginning i'm install ISPConfig 3 using nginx and ubuntu 12.04LTS (server got 2 NIC, eth0 is 192.168.2.x, and eth1 is 192.168.1.x) so ISPconfig address will be https://192.168.2.x:8080 and the internet IP for all website will be served by router B

    now i wanna change all the website to router A's internet IP, already add new IP (router A internet IP) @ ISPConfig => System => Server IP addresses. and then go to Sites => website => change all websites V4 IP to the new added IP. then reboot server (do we need to reboot server or just restart nginx?)

    after reboot check back @ vim /etc/nginx/sites-available/domain.vhost
    it's look like OK
    Code:
    server {
            listen [B]new_internet_IP[/B]:80;
            server_name domain.com;
    
            root   /var/www/domain.com/web;
            ...
    
    
    but when i go for domain domain.com it's just show the Welcome to nginx! i'm sure that the root /var/www/domain.com/web; is correct! Why nginx did not point mine domain to the proper path?

    P/S: domain already change IP address using 3rd DNS service, i'm also ping this domain, it's return the new IP so not DNS problem too!

    Do i miss sth important for changing websites IP?

    Many Thanks and Best Regards.
     
    Last edited: Sep 19, 2012
  2. falko

    falko Super Moderator

    Do you see new_internet_IP in the output of
    Code:
    ifconfig
    ?
     
  3. keba

    keba New Member

    as in the first post

    new internet IP will be served by the router A (192.168.1.1) and my eth1 is 192.168.1.x (while point to new internet IP after do such thing describle on the first post, it forward to my server but only show the welcome to nginx! page)

    Thnks
     
  4. falko

    falko Super Moderator

    That doesn't answer my question as you said nothing abozut your ifconfig output in the first post.

    nginx will serve the correct page only if the IP is listed by ifconfig.
     
  5. keba

    keba New Member

    Code:
    eth0      Link encap:Ethernet  HWaddr 00:1f:c6:e7:e4:d0
              inet addr:192.168.2.102  Bcast:192.168.2.255  Mask:255.255.255.0
              inet6 addr: fe80::21f:c6ff:fee7:e4d0/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:36600 errors:0 dropped:0 overruns:0 frame:0
              TX packets:158 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:2362277 (2.3 MB)  TX bytes:16507 (16.5 KB)
              Interrupt:18
    
    eth1      Link encap:Ethernet  HWaddr 00:1f:c6:e7:e4:03
              inet addr:192.168.1.102  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::21f:c6ff:fee7:e403/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1403297 errors:0 dropped:0 overruns:0 frame:0
              TX packets:782830 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:183791514 (183.7 MB)  TX bytes:2731848448 (2.7 GB)
              Interrupt:17
    
    
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:871868 errors:0 dropped:0 overruns:0 frame:0
              TX packets:871868 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:1224312051 (1.2 GB)  TX bytes:1224312051 (1.2 GB)
    ifconfig. u mean that i must using static Internet IP inside ifconfig?
     
  6. falko

    falko Super Moderator

    The IP that you use in the nginx vhost configuration must be listed in ifconfig.
     
  7. keba

    keba New Member

    Thanks, falko!

    Oh i see, must configure eth1 as a static internet IP... so we can not using the PPPOE methods or DHCP from router, only directly Static internet IP...

    BTW, but for the eth0 no need for that right? ispconfig automatically call out the internet IP via eth0 and point my domain to the right page!
     

Share This Page