WordPress.org

Ready to get started?Download WordPress

Forums

Users outside of my network are redirected to their localhost (8 posts)

  1. americanknight
    Member
    Posted 6 years ago #

    I installed WordPress on my home Windows computer, which is also my server. When I got to the last phase of the installations process, running install.php, Firefox and any other browser brought up a garbled page filled with code. There was an error message along the top that said something about me needing to install wp-config.php even though I had already edited this file with the correct information and double checked it. The fields for naming the blog, providing my email and the check box about making it available to the world were still there, so I filled them in and clicked the garbled up submit button. The page just reloaded.

    So I put http://localhost/abandforallseasons [the name of my blog] into Firefox, curious to see if it had completed or not, and then I got a the same install page, only this time functional and clean and tidy. I entered the information and then was taken to the administration page, from which I've been able to customize the site, which now appears in Firefox every time I type http://localhost/abandforallseasons.

    The problem is that any computer outside of my network can't view it. All of my friends at their various computers have gotten this message: "Firefox can't establish a connection to the server at localhost." I don't know why they're being redirected to their localhosts, but I tried to see if changing the host information in ip-config.php to my domain, gashlermedia.com, would work, which produced the same error. I have many other sites on this computer that people can view with no problem, but just this new WordPress site directs them back to their localhosts.

    Can anyone help?

  2. homeycomb
    Member
    Posted 6 years ago #

    localhost is relative to the box. By that, I mean that "my" localhost is MY pc.

    Your localhost is YOUR pc.

    Your friend's localhost is THIER pc.

    No-one is going to be able to see your blog if you are using localhost in the settings.

    127.0.0.1 = localhost !=NOT accessible to the rest of the Internet

  3. Raishan
    Member
    Posted 6 years ago #

    Ok, let me add this. On my local machine, entering the following: http://www.<mydomainname>/<myblogname&gt; takes me to http://localhost/<myblogname&gt;
    It is somewhere being redirected in the WP configuration.

    The blog is not visible from the internet, and the rest of the webserver content is.

    Yes, I do in fact know what "localhost" is.
    I would like to know where in the configuration this is happening, as the rest of the webserver works just fine.

  4. ClaytonJames
    Member
    Posted 6 years ago #

    It is somewhere being redirected in the WP configuration.

    Log into the admin panel, select options, general. The URL by which the outside world will access your site can be configured at the; "WordPress address (URL):" field.

    If the current URL in the field contains the word "localhost", or the local network ip address of the machine on which it is installed, then it may be difficult for anyone outside of your LAN to access. Fill in the info with your domain name and path to your WordPress installation.

    You do say that you have several sites operational on your server, and I can access your domain with no problem, so the rest is all virtual host configuration or ip based configuration with which you must be familiar.

    Just an afterthought; You may discover that after changing the url in the admin options, you can no longer access your site from the machine on which it is installed. I think this can be solved by adding the url of your blog to the windows hosts file and directing it to resolve to 127.0.0.1 so it can be accessed from a browser on the server if need be. I have also noticed that layout is also occasionally affected if you install on the server, from the server, and later change the path. My best results have been obtained by installing on the server from another machine, and using the actual url to your server for the installation process.

    I hope something I mentioned turns out to be helpful.
    Best of luck.

  5. americanknight
    Member
    Posted 6 years ago #

    Thanks, Clayton, that seems to have been the problem. Where do I find the Windows hosts file?

  6. chrishajer
    Member
    Posted 6 years ago #

    Something like C:\WINDOWS\system32\drivers\etc\hosts

  7. Raishan
    Member
    Posted 6 years ago #

    Clayton,

    Thank you very much. That was probably the only place that I hadn't looked. Everything works fine now.

  8. ClaytonJames
    Member
    Posted 6 years ago #

    My pleasure. Glad I could help.

Topic Closed

This topic has been closed to new replies.

About this Topic