Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> 127.0.0.1 a localhost
langus4101
post 27.03.2008, 22:18:45
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 23.01.2005

Ostrzeżenie: (0%)
-----


Witam,

zainstalowałem sobie WAMP serwer na Windows Vista ;-) no i...
po wpisaniu localhost wyskakuje (IE), że nie może wyświetlić strony, a po wpisaniu 127.0.0.1 wszystko działa OK.
opera wyświetla "localhost"... Firefox nie - tylko 127.0.0.1

O co tu chodzi?

Proszę o pomoc.
Go to the top of the page
+Quote Post
AxZx
post 27.03.2008, 23:31:13
Post #2





Grupa: Zarejestrowani
Postów: 1 385
Pomógł: 55
Dołączył: 1.03.2005
Skąd: śląsk

Ostrzeżenie: (0%)
-----


sprawdz zawartosc pliku
C:\WINDOWS\system32\drivers\etc\hosts

ma byc wpis
Kod
127.0.0.1       localhost


--------------------
aplikacje internetowe | Symfony
Go to the top of the page
+Quote Post
misieks
post 18.11.2008, 17:45:28
Post #3





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 18.11.2008

Ostrzeżenie: (0%)
-----


Witam. Ponawiam pytanie. Zainstalowalem sobie WAMPa. I teraz gdy wpisuje 127.0.0.1 to działa, natomiast wpisujac localhost juz nie :/
Dodam ze mam Viste sad.gif

Tutaj jest plik z C:\Windows\System32\drivers\etc

Kod
# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost
::1             localhost


Czy ktos wie co mam zrobic?
Go to the top of the page
+Quote Post
darecki
post 18.11.2008, 21:04:31
Post #4





Grupa: Zarejestrowani
Postów: 54
Pomógł: 2
Dołączył: 24.08.2005
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


Cytat(misieks @ 18.11.2008, 17:45:28 ) *
::1 localhost[/code]


Usuń ten wpis ::1 localhost, generalnie wpisy w tym pliku muszą mieć postać:

x.x.x.x jakasnazwa

gdzie x.x.x.x jest adresem IP przeważnie 127.0.0.1, a jakasnazwa to wyraz po którym możesz się odwołać i możesz zrobić np tak:

Kod
127.0.0.1 localhost.pl


i po wpisaniu w przeglądarkę localhost.pl powinna się otworzyć stronka, druga sprawa to poprawne skonfigurowanie pliku httpd.conf w apache

Ten post edytował darecki 18.11.2008, 21:08:02


--------------------
Copyright ˆ by Darecki Ÿ Wszystkie prawa zastrzeżone
TanioNaRybki.pl
Go to the top of the page
+Quote Post
misieks
post 18.11.2008, 21:31:55
Post #5





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 18.11.2008

Ostrzeżenie: (0%)
-----


Wielkie dzieki kolego:)
Wyrzucenie tego pomoglo biggrin.gif
Kod
::1             localhost
Go to the top of the page
+Quote Post
Darek82
post 30.11.2013, 13:24:08
Post #6





Grupa: Zarejestrowani
Postów: 130
Pomógł: 0
Dołączył: 27.04.2009

Ostrzeżenie: (0%)
-----


podepne sie bo mam ten sam problem mialem zainstalowany appserv i jakiś czas nie korzystałem z niego, teraz włanczam localhost i wyskakuje "Nie odnaleziono serwera", usunąłem wpis tak jak wyżej podaliście mam teraz tak jak poniżej i nadal nie odnajduje serwera, wpisując 127.0.0.1 działa...

# Copyright © 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost

Go to the top of the page
+Quote Post
com
post 30.11.2013, 14:17:43
Post #7





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

Ostrzeżenie: (0%)
-----


to nie jest problem pliku hosts, tylko pewnie konfiguracji twojego serwera.. bo generalnie w tym pliku wygląda to tak:
Cytat
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost


Wiec tak naprawdę nie masz tam ustawione tego, bo # oznacza komentarz smile.gif
Go to the top of the page
+Quote Post
Darek82
post 30.11.2013, 14:27:02
Post #8





Grupa: Zarejestrowani
Postów: 130
Pomógł: 0
Dołączył: 27.04.2009

Ostrzeżenie: (0%)
-----


W ostatnim wierszu usunąłem znacznik komentarza i nie działa.
Go to the top of the page
+Quote Post
com
post 30.11.2013, 14:35:07
Post #9





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

Ostrzeżenie: (0%)
-----


no właśnie o tym mówię.. domyślnie ta wartość jest za komentowana ponieważ translacja na localhost zajmuje się itak serwer na którym odpalasz phpa...
Go to the top of the page
+Quote Post
Darek82
post 30.11.2013, 14:43:36
Post #10





Grupa: Zarejestrowani
Postów: 130
Pomógł: 0
Dołączył: 27.04.2009

Ostrzeżenie: (0%)
-----


A wiesz co na serwerze pozmieniać w takim przypadku?

OK już mam! smile.gif Avast mi blokuje

Ten post edytował Darek82 30.11.2013, 14:53:30
Go to the top of the page
+Quote Post
com
post 30.11.2013, 17:55:55
Post #11





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

Ostrzeżenie: (0%)
-----


dokładnie to chciałem napisać, ale musiałem iść wink.gif
Go to the top of the page
+Quote Post
Darek82
post 30.11.2013, 19:18:10
Post #12





Grupa: Zarejestrowani
Postów: 130
Pomógł: 0
Dołączył: 27.04.2009

Ostrzeżenie: (0%)
-----


Muszę go niestety wyłanczać na czas "pisania"

Dzieki za otwartość na mojego posta smile.gif
Go to the top of the page
+Quote Post
com
post 30.11.2013, 20:06:16
Post #13





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

Ostrzeżenie: (0%)
-----


a spróbuj dodać regułę, do firewall Awasta wink.gif
Go to the top of the page
+Quote Post
Darek82
post 30.11.2013, 21:31:11
Post #14





Grupa: Zarejestrowani
Postów: 130
Pomógł: 0
Dołączył: 27.04.2009

Ostrzeżenie: (0%)
-----


Wyłanczałem osłonę www i pomagało ale pojedyncze elementy tej osłony metodą prób i błędów wyłanczałem i nic :/
Go to the top of the page
+Quote Post
com
post 30.11.2013, 21:52:30
Post #15





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

Ostrzeżenie: (0%)
-----


https://support3.avast.com/index.php?langua...barticleid=1401 smile.gif
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 26.04.2025 - 02:19