• Resolved 3bx

    (@3bx)


    Hello,

    I have just finished a successful WordPress installation on a local ubuntu server vm. In the general settings area I have this: https://10.0.101.101:5580 I have also modified Apache2 ports.conf and the sites-available default file so the website works on port 5580. I also have a firewall configured with a one to one translation so the outside address public address A.B.C.D:5580 gets translated to 10.0.101.101:5580

    When I put A.B.C.D:5580 into a browser the WordPress site main page does come up, so I know the translation is working, but when I try to navigate off the main page it does not work and the browser ends up showing a “could not connect” with for example this in the browser address bar: https://10.0.101.101:5580/?p=13#comments

    This is different behavior than local browsing, where everything works.

    Why is the web site returning the private address?

    Anyone know what kind of changes I need to make to get navigation off the main page working from outside the local network?

    Thanks,
    Greg

Viewing 13 replies - 16 through 28 (of 28 total)
  • Thread Starter 3bx

    (@3bx)

    s_ha_dum,

    This statement of yours helps to clear things up for me: “The address at wp-admin->Settings->General is the address used by WordPress when generating URLs”

    I think this helps me understand a new and related problem (so this issue is not totally resolved for me after all…) I’m having.

    My WP blog works perfect now from the outside when I use the public address I put in the Site and WordPress address section of General Settings. The thing is I have purchased a domain from Network Solutions and have used their management tool to associate my domain with the public address of my blog. Now (from the outside) if I put my domain in the browser address bar the main page of my blog comes up fine….but again…if I navigate off the page it doesn’t work.

    So the problem here (I think) is the server is sending the url as the static address I configured, but the browser is trying to use a resolvable hostname?

    Wonder how I could fix this? Do I need to edit my /etc/hosts and /etc/hostname file? Then instead of using the static outside address in the general settings use the resolvable hostname of the server (something ClaytonJames mentioned way back in the beginning)?

    Thanks

    Thread Starter 3bx

    (@3bx)

    Something else I don’t understand about installing and self hosting a WordPress blog. When you have a domain like 3bx.us or www.ads-software.com for example, the actual webserver is a host in the domain, so why isn’t the webpage url something like webserver1.www.ads-software.com instead of just the domain www.ads-software.com

    This statement of yours helps to clear things up for me: “The address at wp-admin->Settings->General is the address used by WordPress when generating URLs”

    Right. That address is not a configuration value like the DB_HOST value in that it is not used exclusively internally by the software.

    Now (from the outside) if I put my domain in the browser address bar the main page of my blog comes up fine….but again…if I navigate off the page it doesn’t work.

    What happens?

    So the problem here (I think) is the server is sending the url as the static address I configured, but the browser is trying to use a resolvable hostname?

    I’m a bit confused. If you give a browser a numeric address it won’t even try to resolve it. Usually, you can use the IP and the human-readable name interchangeably.

    Wonder how I could fix this? Do I need to edit my /etc/hosts and /etc/hostname file? Then instead of using the static outside address in the general settings use the resolvable hostname of the server (something ClaytonJames mentioned way back in the beginning)?

    You should be able to use the resolvable hostname, full stop. And you need to or you will get a mix of hostname/IP URLs on your site. Editing /etc/hosts/ on the server will prevent unnecessary outside requests but that is a convenience for you. It shouldn’t effect how things work. At least that is my working theory… ??

    Thread Starter 3bx

    (@3bx)

    What happens is strange. There are no errors, just nothing happens. At the bottom of the browser window I can see where the action is supposed to happen, but it just doesn’t.

    For example if I try a new post I see: (public adress)A.B.C.D:5580/wp-admin/post-new.php at the bottom of the browser…but it just sits there, nothing happens. For fun I recursively chmoded everything in /var/www to 777 to see if that was a problem, but didn’t help.

    Some website actions actually do work though. I can click on the Sample Page and it works and I can leave a reply on a post and it works

    If the server is up you can see for yourself at 3bx.us

    Your URLs are all numeric and all have the :5580 suffix. However, the parts that I can see all seem to work. I can’t get to your backend, obviously ??

    Thread Starter 3bx

    (@3bx)

    Right ?? But if you click on Log in you should at least get the Username / Password page though right? And that doesn’t come up if you access the page with 3bx.us whereas it does if you access the page with the public address:5580 you see when you inspect the source.

    That login page is weird.

    <html><head><title>3BX.US</title><meta name="keywords" content=""</head><frameset rows="100%", *" border="0" frameborder="0"><frame src="https://76.93.148.234:5580" name="3BX.US"></frameset></html>

    What did you do to it? Why is it in a frame like that? And why is it in a frame with the wrong address? Your login page, which works, is here: https://76.93.148.234:5580/wp-login.php

    Thread Starter 3bx

    (@3bx)

    I didn’t make any changes. No idea about the frame. 76.93.148.234 is the right address, it’s my outside address. 3bx.us will resolve to 205.178.189.131 if you ping it from the command line, but that is network solutions and they forward it to 76.93.148.234…

    If I access the website as 3bx.us then right click the Log in link to open in a new tab it works, and as expected the browser bar turns into the address instead of the domain, because that is what I told the WP server to send. If I just click on the Log in link from the main 3bx.us page it doesn’t work.

    Seems like I’m going to have to figure out how to configure my server with a domain name that I can put in the WordPress and Site Address section of the General Settings. Which brings me back to the question I had earlier. I don’t think I can put 3bx.us into the WordPress and Site Address section because that is a domain, not a server. Or maybe I can? Why is it that the website address in the browser bar is www.ads-software.com instead of, for example, webserver1.www.ads-software.com since obviously there is a server. I’m thinking it is because that part is taken care of by apache.

    Thread Starter 3bx

    (@3bx)

    Is there a way to make the dashboard changes by editing config files? I changed the WordPress and Site Address to 3bx.us and as I expected it broke the site.

    I am going to restore from a backup vm, but was wondering if there is a way to reverse or make GUI Dashboard changes from the command line.

    Thanks

    I don’t think I can put 3bx.us into the WordPress and Site Address section because that is a domain, not a server. Or maybe I can?

    I can’t think of any reason you can’t do that. When you punch in “google.com” that is a domain, not a server, yet Google’s servers handle it just fine. That is what DNS is all about. It is no different from when you set up any other site. You put in the domain, not the IP, as a general rule.

    Thread Starter 3bx

    (@3bx)

    I’m pretty sure I know a solution. I buy a static IP from my ISP then create a DNS A record with Network Solutions for something like webserver1.3bx.us matched to the purchased IP address. Then on my WP server, I configure it to return “webserver1.3bx.us” to the “hostname –fqdn” command. After that I can properly put “https://webserver1.3bx.us&#8221; in the WordPress and Site Address section of General Settings and things will work.

    I believe I was mixing up the web forwarding that I have now with the creation of an new A record for my WP server.

    Is there a way to make the dashboard changes by editing config files? I changed the WordPress and Site Address to 3bx.us and as I expected it broke the site.

    https://codex.www.ads-software.com/Changing_The_Site_URL

    Thread Starter 3bx

    (@3bx)

    Ok, I more or less solved the problem with all of your help. Thanks!

    I turned off all my web forwarding at Network Solutions for my domain, 3bx.us, and I configured one DNS A record as such: hisdev1.3bx.us to equal 76.93.148.234

    Then on my server I put “dns-domain 3bx.us” in the /etc/resolvconf/resolv.conf.d/base file and added “dns-domain 3bx.us” to my /etc/network/interfaces file and added to the /etc/hosts file the line: “10.0.101.101 hisdev1.3bx.us hisdev1”

    Then in the Dashboard General Settings for WordPress and Site Address I put: “hisdev1.3bx.us:5580”

    Now from the inside or outside my website works perfectly by putting “hisdev1.3bx.us:5580” in the browser. If I had a different firewall I wouldn’t need to use port 5580, but the SSG5 reserves 80 for itself.

    I consider this to be resolved because I can now view my site locally and from the outside. To make this work I learned I needed three things:

    1. The local WordPress server must be configured to know its own fully qualified domain name. You can verify this with the command “hostname –fqdn”
    2.You must get a DNS A record with the fully qualified domain name of the server (from part 1) and your public IP known to the global DNS.
    3. You must put that same fully qualified domain name from part 1 and 2 in the in the WordPress and Site Address section of the General Settings.

    That’s about it ??

Viewing 13 replies - 16 through 28 (of 28 total)
  • The topic ‘Why does my website return a private address?’ is closed to new replies.