Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Название темы: [решено] VirtualHosts
Показать сообщение отдельно

Аватара для dmitryst

Ветеран


Сообщения: 7315
Благодарности: 909

Профиль | Отправить PM | Цитировать


У меня так:
Код: Выделить весь код
<VirtualHost *:80> 
    ServerAdmin root@localhost 
    ServerName 4site.local 
	ServerAlias www.4site.local  
   DocumentRoot "/srv/www/4site"
     ScriptAlias /cgi-bin/ "/srv/www/4site/cgi-bin/"  
   ErrorLog /srv/www/4site/4site-errors_log    
 CustomLog /srv/www/4site/4site-access_log common         
 <Directory /srv/www/4site/>     
Options Includes Indexes +FollowSymLinks     
AllowOverride all     
Order allow,deny   
  Allow from all    
 </Directory> 

</VirtualHost>  <VirtualHost *:80>     
ServerAdmin root@localhost    
 ServerName simple.local 	
ServerAlias www.simple.local    
 DocumentRoot "/srv/www/simple.local"    
 ScriptAlias /cgi-bin/ "/srv/www/simple.local/cgi-bin/"    
 ErrorLog /srv/www/simple.local/simple-errors_log   
  CustomLog /srv/www/simple.local/simple-access_log common       
   <Directory /srv/www/simple.local/>    
 Options Includes Indexes     
 AllowOverride all    
 Order allow,deny     
Allow from all     
</Directory> 
</VirtualHost>
В файле /etc/hosts сделаны соответствующие записи о хостах. Кстати, в случае чего, будет отображаться первый виртуальный хост. Опция индексов обязательна.

-------
Осваиваю FreeBSD

Это сообщение посчитали полезным следующие участники:

Отправлено: 11:57, 04-10-2008 | #8

Название темы: [решено] VirtualHosts