utworzyłem host o nazwie "przyklad1" tak jak jest opisane w tym tutorialu: http://wortal.php.pl/wortal/artykuly/pomys...wirtualne_hosty
Tak więc plik /etc/hosts wygląda tak:
Cytat
127.0.0.1 localhost
127.0.0.1 przyklad1.localhost
127.0.1.1 szymon-laptop
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
127.0.0.1 przyklad1.localhost
127.0.1.1 szymon-laptop
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
zaś /etc/apache2/httpd.conf tak:
Cytat
NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
ServerAdmin webmaster@domain
DocumentRoot "/var/www/"
ServerName localhost
ServerAlias localhost www.localhost
ErrorLog "logs/noname-error.log"
CustomLog "logs/noname-access.log" common
</VirtualHost>
<VirtualHost 127.0.0.1:80>
ServerAdmin webmaster@domain
DocumentRoot "/var/www/sf_sandbox/web"
ServerName przyklad1.localhost
ServerAlias przyklad1.localhost www.przyklad1.localhost
ErrorLog "/path/to/error/log"
CustomLog "/path/to/custom/log" common
</VirtualHost>
<VirtualHost 127.0.0.1:80>
ServerAdmin webmaster@domain
DocumentRoot "/var/www/"
ServerName localhost
ServerAlias localhost www.localhost
ErrorLog "logs/noname-error.log"
CustomLog "logs/noname-access.log" common
</VirtualHost>
<VirtualHost 127.0.0.1:80>
ServerAdmin webmaster@domain
DocumentRoot "/var/www/sf_sandbox/web"
ServerName przyklad1.localhost
ServerAlias przyklad1.localhost www.przyklad1.localhost
ErrorLog "/path/to/error/log"
CustomLog "/path/to/custom/log" common
</VirtualHost>
Niestety, gdy wpiszę w przeglądarkę http://przyklad1.localhost wyświetla mi się plik /var/www/index.php

Why?