WordPress.org

Ready to get started?Download WordPress

Forums

website.com/blog redirects to 127.0.0.1/blog (6 posts)

  1. Zeromusta
    Member
    Posted 9 years ago #

    Heya.

    I just finished installing this on my fresh Mandrake 10.2b2 box, and it runs perfectly from the localhost that I installed it from. But if someone else tries to access it (they type http://192.168.0.54/blog or http://www.website.com/blog) it redirects them to http://127.0.0.1/blog, which isn't really a good thing.

    I have tried changing the 'localhost' in wp-config.php to 'website.com' but that didn't help, and have also tried changing the wordpress address and blog address in the options section.

    Any ideas? Thanks for reading.

  2. Zeromusta
    Member
    Posted 9 years ago #

    Answering my own questions here. I have discovered that for some reason it is throwing me back to whatever my httpd2.conf "ServerName" variable is. It was originally commented out, and was set to "localhost". When I uncommented it, and changed it to "website.com" it now redirects anything (192.168.0.52/blog) to website.com/blog instead of 127.0.0.1/blog.

    This still doesn't sound right to me, but it works at least. If someone knows what the problem is could they still reply and help out. Thanks.

  3. Zeromusta
    Member
    Posted 9 years ago #

    I'm just going to keep padding this out until someone knows what I'm talking about.

    I commented out the ServerName variable in http2.conf in hope of finding the proper way of fixing this.

    I have discovered that it points to your hostname... kinda. I'm not even sure what I'm talking about. I managed to change my linux hostname to: (cat /etc/hosts) (i'm using dhcp, but the router always gives this computer the same ip, and the 80 port is forwarded to it)

    127.0.0.1 neon.mysite.com localhost.localdomain localhost neon

    which should set up my hostname properly according to a few sites I have found. (I just chose neon as a name for my computer)

    When I now run these commands, I get these results:

    uname -n = neon.mysite.com
    hostname -a = localhost.localdomain localhost neon
    hostname -s = neon
    hostname -d = mysite.com
    hostname -f = neon.mysite.com
    hostname = neon.mysite.com

    But, when I goto http://mysite.com/blog, it redirects me to http://neon.mysite.com/blog, which it can not find.

    Any ideas? Thanks.

  4. kclark
    Member
    Posted 9 years ago #

    Did you every figure this out? I just installed and have the same issue.

    Thanks.

  5. phillc
    Member
    Posted 9 years ago #

    Ok, I've had the same problem with Mandrake 10.1.

    I'll tell you my setup and then how I fixed it.

    Firstly, I'm running my blog (and other web applications) on my local computer which is connected to the internet via an ADSL connection. The connection does not have a fixed IP address so I have a free account at dyndns.com that always points a domain name to my computer, whatever the IP happens to be.

    In my /etc/hosts file I have added entries for my dyndns domain (example below, not my real domain name):

    192.168.1.2 mydomain.homelinux.com
    192.168.1.2 http://www.mydomain.homelinux.com

    So that means I can access my dyndns.org domain locally.

    I then changed httpd.conf as well:

    ServerName mydomain.homelinux.com

    and restarted httpd and it's all working great. No more 127.0.0.1 appearing either locally or to internet visitors. All my other local web software seems to be working great too.

    Hope that helps.

  6. martianpenguin
    Member
    Posted 9 years ago #

    alright, I just installed this on an apache installation running on windows xp. it's the same issue, but it isn't solved by changing the config file for apache and i don't know the equivalent to /etc/hosts on windows. (I'll probably just end up setting this up on a linux server instead, but I had an extra windows computer for now.)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.