PDA

View Full Version : Firefox switches URL



GaryG
13th January 2007, 10:21 PM
I enter
http://localhost:631/printers in the address window (first attachment)

But the url gets changed to
http://en.wikipedia.org/wiki/LocalhostSee second attachment

How come?

It works ok with Konquerer, but I want to use firefox.

u-noneinc-s
13th January 2007, 11:10 PM
I don't know if it will make an difference, but have you tried https?

GaryG
14th January 2007, 10:12 PM
Found out what the problem is.
Somewhere along the way I changed something that caused the name of my computer to be changed from "localhost.localdomain" to "xxx.xxx.xxx.2 if I enter the url like this;
http:xxx.xxx.xxx.2:631 it works.

Ok, what did I change --- was it by any chance "/etc/hosts"

Edit: :( that did not fix it

mwette
14th January 2007, 10:31 PM
Are you running SELINUX? When I was running that changes
to hosts did not seem to "hook in".

u-noneinc-s
14th January 2007, 10:48 PM
SElinux has never given me this kind of problem, but it's not unlike SElinux to cause weird problems so mwette could be on the money. To disable SElinux as root, setenforce 0 then edit /etc/hosts again and see if it sticks. If that doesn't work, look into NetworkManager. It gave me a fit. It kept overwriting my resolv.conf (but I don't recall if it affected /etc/hosts or not but if your hostname is changing to an IP, I guess it could be the culprit).
To re-enable SElinux setenforce 1.

GaryG
15th January 2007, 12:35 AM
The last thing I changed was to set /etc/hosts to the same content as in /etc/hosts in the other linux installed on this box. Content of /etc/hosts is now:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost

I have no idea what I did that caused /etc/hosts to be changed originally - I did not touch it untill I started looking for a solution to this problem.

u-noneinc-s
15th January 2007, 12:52 AM
Even with /etc/hosts now corrected, is it still changing the url in firefox? (or is /etc/hosts going to change again when you reboot?).

EIDT: I believe this is what mwette meant by "not taking". It will change when you edit it but revert when you reboot. (Is this correct mwette?)

mwette
15th January 2007, 01:42 AM
Even with /etc/hosts now corrected, is it still changing the url in firefox? (or is /etc/hosts going to change again when you reboot?).

EIDT: I believe this is what mwette meant by "not taking". It will change when you edit it but revert when you reboot. (Is this correct mwette?)

I meant that you change /etc/hosts and network commands don't see the results.
Here was my experience. I added an entry to /etc/hosts. Then tried to ping a host
via "ping <hostname>". That didn't work, I thought the host was having problems.
Then I found that I could ping by IP address. Then I found that if I turned off SELINUX
that I could ping by hostname. This was months ago so I may not remember all the
details precisely. In any case, it was enough to convince me I was not ready for
SELINUX just yet. (I'll let others shake it out some more...)

u-noneinc-s
15th January 2007, 01:57 AM
Thanks for the clarification on /etc/hosts not taking, and I had no doubt about your SELinux experience. ;) I've been pretty fortunate in the SELinux dept. I had a bad update back with FC3 and I waited for the next update to fix it. I probably could have fixed it with a relabel but didn't know anything about it then (and don't know much more now). Other than that, SELinux has always been enabled (except for temporary disables for testing).

GaryG
15th January 2007, 03:03 AM
even with /etc/hosts now corrected, is it still changing the url in firefox? (or is /etc/hosts going to change again when you reboot?). It works fine now. I needed to reboot after making the change before it would work.

Thank you all for the assistance