From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.2.5 X-Yandex-Spam: 1 X-Yandex-Front: smtp15 X-Yandex-TimeMark: 1222429145 X-MsgDayCount: 6 X-Comment: RFC 2476 MSA function at smtp15.yandex.ru logged sender identity as: alt-skeeper Message-ID: <48DCC93A.4040002@yandex.ru> Date: Fri, 26 Sep 2008 15:36:26 +0400 From: SKeeper User-Agent: Thunderbird 2.0.0.6 (X11/20070804) MIME-Version: 1.0 To: ALT Linux sysadmin discuss References: <48DC81BB.2000604@yandex.ru> <48DC8F79.7010309@yandex.ru> <48DCA31D.8040700@solin.spb.ru> In-Reply-To: <48DCA31D.8040700@solin.spb.ru> Content-Type: multipart/mixed; boundary="------------050805050508080502070100" Subject: Re: [Sysadmins] =?koi8-r?b?7sHT1NLPysvBIHZob3N0cyDOwSBhcGFjaGUyICAo?= =?koi8-r?b?YnJhbmNoIDQuMSk=?= X-BeenThere: sysadmins@lists.altlinux.org X-Mailman-Version: 2.1.10b3 Precedence: list Reply-To: ALT Linux sysadmin discuss List-Id: ALT Linux sysadmin discuss List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2008 11:39:11 -0000 Archived-At: List-Archive: This is a multi-part message in MIME format. --------------050805050508080502070100 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit Aleksey Avdeev пишет: > SKeeper пишет: >> Желудков Д.В. пишет: >>> Есть ли внятный талмуд или инструкция по настройке хотя бы одного >>> name based виртуального хоста на локалхост? Имеющийся опыт настройки >>> в bsd системах и ArchLinux не могу использовать, так как структура >>> конфигов довольно сильно изменена, а настроить надо в сжатые сроки. >>> Подойдет даже очень сжатая инструкция :) >> В /etc/httpd2/conf/sites-avialable/vhosts.conf вставляете кусок вида: >> >> > ^^^^^^^^^^^^^^^^^ >> ServerAdmin your@mail >> DocumentRoot "/var/www/vhosts/virt-host-directory" >> ServerName 127.0.0.1 >> ServerAlias www.virt-host-name >> ErrorLog "/var/log/httpd2/virt-host-name-error_log" >> CustomLog /var/log/httpd2/virt-host-name-access_log common >> > > В данном случаи получился vhost использующий оба механизма (по имени > и ip). > > Чтобы vhost был доступен по данному имени с любых ip (и открытых > портов): > > > ServerName <имя vhost> > ServerAlias <альтернативное имя vhost> > ... > Просто если вставляю такой кусок, то по запросу на <имя vhost> открывается не то, что лежит в /var/www/vhosts/virt-host-directory, а то что лежит в /var/www/apache2/html/. В чем может быть проблема? В аттаче то как пробовал писать --------------050805050508080502070100 Content-Type: text/plain; name="vhosts.conf.mini" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="vhosts.conf.mini" # # Summary: Use name-based virtual hosting for *:80 # Provides: NameVirtualHost # # # Virtual Hosts # # If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # Use name-based virtual hosting. # NameVirtualHost *:80 # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for all requests that do not # match a ServerName or ServerAlias in any block. # # # ServerAdmin webmaster@dummy-host.example.com # DocumentRoot "/www/docs/dummy-host.example.com" # ServerName dummy-host.example.com # ServerAlias www.dummy-host.example.com # ErrorLog "/var/log/httpd2/dummy-host.example.com-error_log" # CustomLog "/var/log/httpd2/dummy-host.example.com-access_log common" # # # # ServerAdmin webmaster@dummy-host2.example.com # DocumentRoot "/www/docs/dummy-host2.example.com" # ServerName dummy-host2.example.com # ErrorLog "/var/log/httpd2/dummy-host2.example.com-error_log" # CustomLog "/var/log/httpd2/dummy-host2.example.com-access_log common" # ServerName moodle.local ServerAdmin skeeper86@mail.ru DocumentRoot "/var/www/vhosts/moodle" ServerAlias www.moodle.local ErrorLog "/var/log/httpd2/moodle.local-error_log" CustomLog /var/log/httpd2/moodle.local-access_log common --------------050805050508080502070100--