• Hello everyone, nice meeting y’all

    So, I just installed a WordPress container on a Ubuntu 19.04 VM through VirtualBox, the website looks fine on the VM, however when accesing it through other hosts connected to the VM, including my main host, it looks completely different, images and themes are not seen, and font is times new roman.

    If screenshots are needed please ask for them

    Thanks in advance, and feel free to move this out to other section if needed!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Use your browsers debug inspector. What errors do you see in the error console? My bet is that you have a bunch of 404s due to addressing issues when connecting from outside the VM.

    Thread Starter erudes

    (@erudes)

    Hi Steve, thanks for answering

    First, I need to tell you that I’m no WebDev expert nor rookie, I’m just an IT guy who need to set up an environment for designers to work with, so Im not sure how the debug works but this is what I found:

    I will show you picture of how this looks like…

    Inside the VM, which hosts the container with this website:

    View post on imgur.com

    And this is how it looks on Microsoft Edge, in my host machine, not the VM (This would be the PC with VirtualBox Installed)

    View post on imgur.com

    I think this one shows the errors why the website does not show up properly, it has to do with JavaScripts I guess:

    View post on imgur.com

    Thanks for replying Steve!

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You have issues accessing the CSS files. You need to give the site a real URL on your local network. Localhost refers to the machine on which your viewing, so it’s different for each viewer. Assign the website a domain name and make it available across your local network.

    Thread Starter erudes

    (@erudes)

    Thank you Steve!

    I really found it weird, the fact that when accessing through IP, it resolves to localhost, so there must be a binding between that name and the IP somewhere on the server.

    Do you think I should try editing host file on every PC? or should I investigate on nginx or the container about this?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    What is the URL of the site under settings->general?

    Thread Starter erudes

    (@erudes)

    Both WordPress address and Site Address are set as:

    https://localhost

    Which one should I change, the second one right? To anything I like and try again to access with the hostname?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Yes. Make sure you define the host in either your local DNS or in the hosts files on machines that will be accessing the site.

    Thread Starter erudes

    (@erudes)

    Ok, so I set the name as containerwpress.com, and it actually works after setting up local DNS resolution on the hosts, however, the website outside the VM is still showing different. The only improvement I was able to find is that now, Im able to browse the different sections of the website, outside the VM, I could not before.

    I’ll run debug if you want and post it in a while

    Thread Starter erudes

    (@erudes)

    Update: I was able to create a port forwarding rule on my router which allows me to access the website through my external IP Address, however, the website has the same issue with CSS and if I try to access it through my phone with LTE connection (different external IP) it tries to resolve to containerwpress.com and fails.

    Is that because I sohuld update hosts file on android phone as well?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Probably. containerwpress.com is not defined in the public DNS.,

    Thread Starter erudes

    (@erudes)

    Steve, you are right about that, maybe with DynDNS I can make something work.

    Any ideas about the styles still now showing up?

    As said before going into sections now works outside VM

    Thread Starter erudes

    (@erudes)

    Getting these errors which I googled but found related issues but not quite the same I got:

    View post on imgur.com

    Any guidance?

    Thread Starter erudes

    (@erudes)

    Hey Steve Update #2

    I was able to edit home and site URLs and get the website working. I can even access it externally through DynDNS. However, despite the website being accesible from anywhere in the world. I cannot access it through the server itself.

    Additionally, whenever I press the home button on the theme I get redirected to localhost which returns an error. Any help or link where I should be posting this in case this is not the right place to do so?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Website looks different on different hosts’ is closed to new replies.