rewrite catch all subdomain
Igor Sysoev
is at rambler-co.ru
Tue Mar 11 15:45:54 MSK 2008
On Tue, Mar 11, 2008 at 08:37:24PM +0800, Cherife Li wrote:
> Pedro Axl wrote:
> >Now I think the structure is ok, but I receive another error:
> >
> >Starting nginx: 2008/03/11 09:21:07 [emerg] 25934#0: first server name
> >"*.domain.com" must not be wildcard in /etc/nginx/nginx.conf:145
> >
> >
> >
> >Igor Sysoev wrote:
> >>On Mon, Mar 10, 2008 at 06:17:15PM +0100, Pedro Axl wrote:
> >>
> >>>I'm not pretty sure what I'm doing, hehe. I have to open a new server
> >>>{.....} right?
> >>>
> >>>But If I do it when I try to start nginx I receive this error:
> >>>Starting nginx: 2008/03/10 14:22:33 [emerg] 17834#0: directive "server"
> >>>in /etc/nginx/nginx.conf:81 is not allowed here
> >>You configuraiton file should have the following structure:
> >>
> >>http {
> >>
> >> server {
> >> location ... {
> >> }
> >>
> >> location ... {
> >> }
> >>
> >> location ... {
> >> }
> >> }
> >>
> >> server {
> >>
> >> }
> >>
> >>You did not close some bracket.
> >
>
> (.*\.)?\.domain\.com
No.
First, in this version regex can not be first name too.
Second, .domain.com is not valid name.
Third, domain.com shoule be handled in another server.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list