nginx config virtual hosts

rkmr.em at gmail.com rkmr.em at gmail.com
Sat Dec 8 20:28:26 MSK 2007


works great! thanks!

On Dec 7, 2007 11:19 PM, Igor Sysoev <is at rambler-co.ru> wrote:

> On Fri, Dec 07, 2007 at 06:53:03PM -0800, rkmr.em at gmail.com wrote:
>
> > I have this config and, www.domain2.com goes to domain1.com
> > What do I set in server_name so that all sub-domain requests go to that
> > server?
> >
> > xxx.domain2.com-> domain2
> > thanks
> >
> >
> >     server {
> >         listen       80;
> >         server_name  domain1.com;
> >
> >
> >     server {
> >         listen       80;
> >         server_name  domain2.com;
>
> If you do not need redirect, then:
>
>         server_name  domain2.com  *.domain2.com;
>
> or (better):
>
>         server_name  .domain2.com;
>
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20071208/1a499cf1/attachment.html>


More information about the nginx mailing list