"server" directive is not allowed here error

Anoop Alias anoopalias01 at gmail.com
Sun Jun 4 10:31:09 UTC 2017


Hi Dino,

I believe you have an unbalanced curly brace somewhere causing the error.

You should check this in a text editor that can highlight syntax.



On Sun, Jun 4, 2017 at 3:58 PM, Dino Edwards <dino.edwards at mydirectmail.net>
wrote:

>
> > You can't have server {} block outside http {} (
> http://nginx.org/en/docs/http/ngx_http_core_module.html#server )
>
> > So it has to be:
>
> > http {
> > server {
> >   // whatever goes here
> >  }
> > }
>
>
> That can't be right, because before I used the multiple location
> directives, I didn't have http and it worked fine. Regardless, I followed
> your advice and I got the following now:
>
> nginx: [emerg] "http" directive is not allowed here in
> /usr/local/nginx/conf/sites-enabled/ server.domain.tld -ssl:1
>
> Thanks in advance
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



-- 
*Anoop P Alias*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170604/d2c9807d/attachment.html>


More information about the nginx mailing list