Question: Extra Nginx config not read from kong.yml?

92 views
Skip to first unread message

Tom S

unread,
Apr 28, 2016, 8:41:50 AM4/28/16
to Kong

Maybe I'm not doing it right, but from what I understood I could use nginx config block in kong.yml to add new sites to be served. Is this possible or I'm understanding it wrong and instead of trying to push stuff inside kong I should just link it with standalone nginx container? I'm using kong with docker, I've tried to add server just below the http clause, but it seems that it's not being read/working. I tried same config on pure nginx container and it works well... I point the service1.local on my host to docker ip, reload kong config and exposed ports on docker...

http {

server {
  listen 80;
  server_name service1.local;

  location / {
     root /usr/share/nginx/html/service1;
     index index.html;
  }

  location /nginx_status {
    internal;
    access_log off;
    stub_status;
  }

  location /robots.txt {
    return 200 'User-agent: *\nDisallow: /';
  }
}

Marco

unread,
Apr 28, 2016, 6:07:21 PM4/28/16
to Tom S, Kong
That is correct. The "nginx" property is being used to create the nginx.conf file in the working directory, so if you change the property and restart Kong it should load your changes.

I would also check the contents of the compiled "nginx.conf" file in the working directory to make sure everything looks good.

Cheers


 Marco Palladino | CTO @ Mashape | mashape.com+1 (415) 361-3858

--
You received this message because you are subscribed to the Google Groups "Kong" group.
To unsubscribe from this group and stop receiving emails from it, send an email to konglayer+...@googlegroups.com.
To post to this group, send email to kong...@googlegroups.com.
Visit this group at https://groups.google.com/group/konglayer.
To view this discussion on the web visit https://groups.google.com/d/msgid/konglayer/41daf8bc-df97-4525-94b2-4a47bc3b9530%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages