I want to configure apache2 to host multiple websites on XP. Not very sure with editing the httpd.conf file. Can anyone help with the configuration part开发者_如何学Go?
Check out this page regarding setting up virtual hosts: http://httpd.apache.org/docs/2.0/vhosts/examples.html
I think you can only host one site with XP.
But if you can host more here is the code to put in the bottom of your httpd.conf
NameVirtualHost my.ip.addr.ess
<VirtualHost my.ip.addr.ess>
ServerName www.domain.com
ServerPath /domain
DocumentRoot /htdocs/domain
</VirtualHost>
Original from Apache site
NameVirtualHost 111.22.33.44
<VirtualHost 111.22.33.44>
ServerName www.domain.tld
ServerPath /domain
DocumentRoot /web/domain
</VirtualHost>
精彩评论