修改apahce下的httpd.conf
增加:
<VirtualHost yourhost:port>
ServerAdmin adminE-mail
DocumentRoot the path of your webapp
ServerName your host name
ErrorLog Errorlog path
CustomLog accesslog path common
</VirtualHost>
例如:
<VirtualHost 127.0.0.1:80>
ServerAdmin 123@sina.com
DocumentRoot /var/www/vhosts/webapp1
ServerName localhost
ErrorLog logs/localhost-error_log
CustomLog logs/localhost-access_log common
</VirtualHost>