Apache, problem s VirtualHost

David Michal david.michal na czechwireless.cz
Středa Prosinec 12 11:06:02 CET 2001


Zdravim,
Jo uz mi to taky chodi a timto se to vysvetluje:

As a consequence, the first listed virtual host is the default virtual host.
The DocumentRoot from the main server will never be used when an IP address
matches the NameVirtualHost directive. If you would like to have a special
configuration for requests that do not match any particular virtual host,
simply put that configuration in a <VirtualHost> container and list it first
in the configuration file.

Jo ta dokumentace. Ono to tam pokazde je, jenom to najit. :) Diky vsem
zucastnenym za pomoc.
David

Ja to mam v httpd.conf takto a chodi mi to v pohode>>

NameVirtualHost IP_ADRESA
<VirtualHost IP_ADRESA>
    ServerAdmin root na unimontex.cz
    DocumentRoot /var/www/html
    ServerName www.unimontex.cz
    ErrorLog /etc/httpd/logs/error_log
    CustomLog /etc/httpd/logs/access_log common
</VirtualHost>
<VirtualHost IP_ADRESA>
    ServerAdmin root na unimontex.cz
    DocumentRoot /var/www/html_virtual/montpetrol.cz
    ServerName www.montpetrol.cz
    ErrorLog /etc/httpd/logs/virtual/mont_cz_error_log
    CustomLog /etc/httpd/logs/virtual/mont_cz_access_log common
</VirtualHost>



Další informace o konferenci Linux