你只要配置多个virtualhost就可以了,例如下面这样: <VirtualHost *:80>
DocumentRoot "/usr/local/www1"
ServerName a.test.com
ErrorLog "/var/log/httpd/www1-error_log"
CustomLog "/var/log/httpd/www1-access_log" common
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/usr/local/www2"
ServerName b.test.com
ErrorLog "/var/log/httpd/www2-error_log"
CustomLog "/var/log/httpd/www2-access_log" common
</VirtualHost>
你只要配置多个virtualhost就可以了,例如下面这样: <VirtualHost *:80>
DocumentRoot "/usr/local/www1"
ServerName a.test.com
ErrorLog "/var/log/httpd/www1-error_log"
CustomLog "/var/log/httpd/www1-access_log" common
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/usr/local/www2"
ServerName b.test.com
ErrorLog "/var/log/httpd/www2-error_log"
CustomLog "/var/log/httpd/www2-access_log" common
</VirtualHost>