Results 1 to 4 of 4

Thread: Can't connect websites on VM

  1. #1
    Join Date
    Apr 2006
    Beans
    2,800

    Can't connect websites on VM

    Hi all

    Host OS - Ubuntu 20.04 desktop
    VM OS - Ubuntu 20.04 desktop

    I have WordPress sites created on VM sometimes ago. At time of their building the LAN Address of the VM was 192.168.0.101. The WP sites are on;
    /var/www/html/site1
    /var/www/html/site2
    /var/www/html/site3
    /var/www/html/site3
    etc.

    To browse the WP sites just on browser ran;
    /192.168.0.101/site1
    /192.168.0.101/site2
    /192.168.0.101/site3
    /192.168.0.101/site4
    etc.

    Now the router IP address has been changed to 192.168.1.1. I have changed the VM IP address to 192.168.1.101, replacing 0 with 1

    ifconfig shows IP address correct.

    But websites can't be login to admin

    Running
    192.168.1.101/site1/wp-login.php

    It took prolonged time and finally failed with warning;
    Code:
    The connection has timed out
    
    The server at 192.168.0.216 is taking too long to response
    .......
    It shows IP address 192.168.0.216.

    Please advise how to fix the problem? Which file I have to edit? Thanks

    Regards

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    22,161
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Can't connect websites on VM

    Which hypervisor is being used? Are the guest VM connections setup as bridged for that VM?
    Does the web server configuration specify an IP address? They don't need to, but you may have set one in the sites-enabled/ config files.
    I just specify the port, no IP, in my configs so this isn't an issue.

    You can use telnet to visit the website
    telnet 192.168.1.101 80
    Type "GET" if that connects. The top page HTML should be returned.

    If no connection is made, check that
    • the web server is on port 80,
    • the IP address used from outside is correct,
    • the firewall allows connections from your client to the server

    The web server logs should show any connection. Check there first. If nothing shows up, then that is the first issue to fix. We've all done this.


    With VMs, if the networking is set to be bridged, then it is unlikely any inbound connections will be allowed. Host-only, NAT, and one other I can't remember the name of don't allow inbound connections. But it depends on the hypervisor used.

  3. #3
    Join Date
    Apr 2006
    Beans
    2,800

    Re: Can't connect websites on VM

    Quote Originally Posted by TheFu View Post
    Which hypervisor is being used? Are the guest VM connections setup as bridged for that VM?
    Does the web server configuration specify an IP address? They don't need to, but you may have set one in the sites-enabled/ config files.
    I just specify the port, no IP, in my configs so this isn't an issue.

    - snip -
    Hi

    Thanks for your advice.

    The problem is caused by database, mariadb, in my case. I almost forgot. Please see my following posting on WordPress Org about 4 weeks ago;
    https://wordpress.org/support/topic/...a-cloned-site/
    post - 3 weeks, 2 days ago

    There are 35 websites on this VM. It'll take me lengthy time to correct the problem on all of them. I'm considering whether it would be easier to clone all of them on a new VM? I have their Duplicator packages on my database.

    Regards

  4. #4
    Join Date
    May 2010
    Beans
    975

    Re: Can't connect websites on VM

    What are you using to virtualise? VMWare? Virtualbox? QEmu?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •