Книга: Fedora™ Unleashed, 2008 edition
Address-Based Virtual Hosts
Address-Based Virtual Hosts
After you've configured your Linux machine with multiple IP addresses, setting up Apache to serve them as different websites is simple. You need only put a VirtualHost
directive in your httpd.conf
file for each of the addresses you want to make an independent website:
<VirtualHost 212.85.67.67>
ServerName gnulix.org
DocumentRoot /home/virtual/gnulix/public_html
TransferLog /home/virtual/gnulix/logs/access_log
ErrorLog /home/virtual/gnulix/logs/error_log
</VirtualHost>
Use the IP address, rather than the hostname, in the VirtualHost
tag.
You can specify any configuration directives within the <VirtualHost>
tags. For example, you might want to set AllowOverrides
directives differently for virtual hosts than you do for your main server. Any directives that aren't specified default to the settings for the main server.
- Virtual Hosting
- Name-Based Virtual Hosts
- Dynamically Mapped Virtual Addresses
- Statically Mapped Virtual Addresses
- Chapter 5 Installing and Configuring VirtualCenter 2.0
- Chapter 16. Commercial products based on Linux, iptables and netfilter
- Internet Service Providers who use assigned IP addresses
- Глава 2 Виртуальные машины Virtual PC 2004
- 11.2. Локальный hosts
- Kernel Address Space
- Text-Based Console Login
- GUI-Based Printer Configuration Quick Start