Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: virtualhost
Forum PHP.pl > Forum > Serwery WWW > Apache
mlody
Mogę sobie zrobić na moim komputerze virtualhost'y ?

Mam Apache'a 2 i w http.conf ServerName localhost.

Czy moge zrobić np. <virtualhost costam.locathost>

Próbowałem i mi wywala Apache'a.
hyper
Gorąco polecam:
http://httpd.apache.org/docs-2.0/ - Indeks dokumentacji httpd 2
http://httpd.apache.org/docs-2.0/vhosts/ - Wirtualne hosty dokładniej
http://google.com.pl/ - Niezastąpiona wyszukiwarka WWW
http://groups.google.com.pl/ - Niezastąpiona wyszukiwarka Usenetu[/img]
mlody
Czytałem dokładnie dokumentacje i nic:

Mam takie ustawienie w httpd.conf:

Kod
ServerName localhost

Listen 80



NameVirtualHost 127.0.0.1

<VirtualHost localhost>

    ServerAdmin admin@localhost

    DocumentRoot c:/localhost

    ServerName localhost

    ErrorLog /logs/error_log

</VirtualHost>



<VirtualHost costam.localhost>

    ServerAdmin admin@localhost

    DocumentRoot c:/localhost/costam

    ServerName costam.localhost

    ErrorLog /logs/error_log

</VirtualHost>


Wywala mi taki bład:
ERROR (33501) Host not found: Cannot resolve host name costam.localhost --- ignoring!
Officerrr
wpisy do hosts musisz zrobic
FiDO
Kod
ServerName localhost

Listen 80



NameVirtualHost 127.0.0.1

<VirtualHost localhost>

    ServerAdmin admin@localhost

    DocumentRoot c:/localhost

    ServerName localhost

    ErrorLog /logs/error_log

</VirtualHost>



<VirtualHost localhost>

    ServerAdmin admin@localhost

    DocumentRoot c:/localhost/costam

    ServerName costam.localhost

    ErrorLog /logs/error_log

</VirtualHost>

Sprobuj tak ^^^
GeoS
Albo jeszcze lepiej:
Kod
ServerName localhost

Listen 80



NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>

   ServerAdmin admin@localhost

   DocumentRoot c:/www/localhost

   ServerName localhost

   ErrorLog /logs/error_log

</VirtualHost>



<VirtualHost 127.0.0.1>

   ServerAdmin admin@localhost

   DocumentRoot c:/www/costam

   ServerName costam.localhost

   ErrorLog /logs/error_log

</VirtualHost>


Tylko pamietaj o zrobieniu wpisow do pliku hosts biggrin.gif
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.