Page 1 of 1

vhost and supdomein

PostPosted: 16. August 2007 17:14
by rvanherp
Hi i want to host more than 2 sites.
one www.test1.nl (htdocs/site1)
and www.test2.nl (htdocs/site2)
but the test2 site has also some sup domains
like movie.test2.nl (htdocs/movie)
or likeme.test2.nl (htdocs/likeme)

how can i make this work in the vhost config

Thanks for the help
Richard

PostPosted: 16. August 2007 17:17
by Wiedmann
Just setup 4 vhosts and not only 2.

PostPosted: 16. August 2007 17:23
by rvanherp
Thanks for the fast replay

i am now here.

<VirtualHost *:80>
ServerName www.test1.nl
DocumentRoot /htdocs/test1
</VirtualHost>

<VirtualHost *:80>
ServerName www.test2.nl
DocumentRoot /htdocs/test2
</VirtualHost>

but if i go to www.test2.nl
i see the page of test 1

pleas help,

PostPosted: 16. August 2007 17:31
by Wiedmann

PostPosted: 16. August 2007 17:38
by rvanherp
yes, but it’s not working.
I think I forget something.

can anyone post a config
with 2 domains and a sup domain.

Maybe I can see what I miss

Thanks

PostPosted: 16. August 2007 17:44
by Wiedmann
yes

For example I don't see the the directive "NameVirtualHost" (as described in the manaul) in your post.

with 2 domains and a sup domain.

Then you have 3 domains and you need 3 vhosts.

PostPosted: 16. August 2007 17:55
by rvanherp
Think i have it.

DocumentRoot /htdocs/lookme
ServerName lookme.test2.nl
ServerAlias test2.nl

next is

DocumentRoot /htdocs/new
ServerName new.test2.nl
ServerAlias test2.nl

is this oke ?

PostPosted: 16. August 2007 20:51
by rvanherp
next problem

one sup domain is for ssl only.
how to set up in the conf ??

now i have

<VirtualHost *:443>
ServerAdmin me@me.nl
DocumentRoot /htdocs/secure
ServerName secure.test2.nl
ServerAlias test2.nl
ErrorLog @rel_logfiledir@/secure-error_log
CustomLog @rel_logfiledir@/secure-access_log common
</VirtualHost>

is this oke ?

an what about this ?
# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80

do i need to add 433 for the https ??

let me know

Thanks