apache - Hosting two websites from the same webserver -


on webserver, want serve several websites based on domain name.

for example, want webserver serve "mycoolsite.com" , "badstuff.org".

i pointed both sites @ same ip address. in httpd-vhosts, made 2 entries:

<virtualhost *:80>   documentroot /www/mycoolsite   servername www.mycoolsite.com </virtualhost>  <virtualhost *:80>   documentroot /www/badstuff   servername www.badstuff.org </virtualhost> 

but when go badstuff.org, served mycoolsite.com! why happening?

apache doc

i know when use mamp, have adjust "hosts" file too. relevant?

have added namevirtualhost directive before vhosts declaration ?

namevirtualhost *:80  <virtualhost *:80> ... </virtualhost> 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -