Skip to main content
127.0.0.1 as host links Started by sshagent · · Read 6652 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

127.0.0.1 as host links

So having spotted this today and eager to find somewhere to migrate my smf forum to i gave this a whirl.  I'm just doing the base installation.  Even used defaults where possible.

Everything looks great during the installation process but once done and i go to look at the forum for some reason all the urls in the html are prefixed with 127.0.0.1 and not my domain name.  Which understandably makes a fugly page.  I'm using the currently .zip download from the front page of this domain. 

Anyone got any clues to what is going on here?  Thanks for your time.

Re: 127.0.0.1 as host links

Reply #1

A link to the forum would be great, sometimes it will show the IP address if installed on a local host.

Re: 127.0.0.1 as host links

Reply #2

Hello sshagent and welcome! :D

127.0.0.1 is the default "url" showed during the installation, usually you have to change it during the installation (2nd step).
Can you check (via ftp) in your Settings.php what is the value of $boardurl?
If it is http://127.0.0.1 you can change it to your domain.
Bugs creator.
Features destroyer.
Template killer.

Re: 127.0.0.1 as host links

Reply #3

http://eternalrising.net/forum/

And here are the mentions of eternalrising.net from my Settings.php in case that helps

grep eternalrising forum/Settings.php
$boardurl = 'http://eternalrising.net/forum';
$webmaster_email = 'mail@eternalrising.net';
$cachedir = '/var/www/eternalrising/forum/cache';
$boarddir = '/var/www/eternalrising/forum';
$sourcedir = '/var/www/eternalrising/forum/sources';
$extdir = '/var/www/eternalrising/forum/sources/ext';


Re: 127.0.0.1 as host links

Reply #4

and if you try a grep for 127.0.0.1?
Bugs creator.
Features destroyer.
Template killer.

Re: 127.0.0.1 as host links

Reply #5

nothing.

root@Ubuntu-1404-trusty-64-minimal:/var/www/eternalrising/forum# grep 127.0.0.1 Settings.php
root@Ubuntu-1404-trusty-64-minimal:/var/www/eternalrising/forum# grep -i localhost Settings.php
$db_server = 'localhost';

Thanks for your time with this

Re: 127.0.0.1 as host links

Reply #6

Okay, another small test, try a simple script like this:
Code: [Select]
<?php
echo $_SERVER['HTTP_HOST'] . '<br />';
echo $_SERVER['SERVER_NAME'];
what are the two values?
Bugs creator.
Features destroyer.
Template killer.

Re: 127.0.0.1 as host links

Reply #7

output =
eternalrising.net
eternalrising.net

Showing here... http://eternalrising.net/a.php


Re: 127.0.0.1 as host links

Reply #8

I was looking at the wrong side of the problem.
It's just the themes that has a wrong url.


Go here:
http://eternalrising.net/forum/index.php?action=admin;area=theme;sa=list

don't worry about the missing styles and stuff, go all the way down to the end of the page, you'll find an input named "Base URL to the same directory", in that one you put
Code: [Select]
http://eternalrising.net/forum/themes
and save.
Bugs creator.
Features destroyer.
Template killer.

Re: 127.0.0.1 as host links

Reply #9

That fixed it.  Thanks.
Any idea what went wrong?  If there is a bug of some sort I'm more than happy to supply any info from my end that might be needed.

Re: 127.0.0.1 as host links

Reply #10

Short answer: no. Not the slightest.
In theory the theme url is set based on the $boardurl variable:
Code: [Select]
(1, 'theme_url', '{$boardurl}/themes/default'),

The value in Settings.php is correct, so it should have been correct at that point as well because when the database is populated, Elk already relies on Settings.php... odd.
If you have some spare time, you may try again to install and see if the problem appears again. I'll give it a try before night.
Bugs creator.
Features destroyer.
Template killer.

Re: 127.0.0.1 as host links

Reply #11

I tried a few times before posting

Re: 127.0.0.1 as host links

Reply #12

Just to add, if you end up wanting me to try anything different or such to track this down.  Let me know and i'll get to it.  I'm in the office tomorrow (no working from home) so won't have much time to be messing about, but on Friday i should have plenty of time

Re: 127.0.0.1 as host links

Reply #13

Thanks!

I'll try to think where the problem can be. ;D
Bugs creator.
Features destroyer.
Template killer.