Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
upstream suggestions {
    ip_hash;
    keepalive 16;
    server IPSUGGESTIONS_СЕРВЕРАSERVER_ПОДСКАЗОКIP:8080;
}

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    # uncomment for https support
    # listen 443 ssl;
    # listen [::]:443 ssl;

    server_name _;

    # uncomment for https support
    # IMPORTANT: you should issue certificate (public.pem and and private.pem) first
    # ssl_certificate /etc/nginx/ssl/public.pem;
    # ssl_certificate_key /etc/nginx/ssl/private.pem;

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_http_version 1.1;
    proxy_set_header Connection "";

    location /suggestions/ {
         proxy_pass http://suggestions;
     }
}

Вместо IPSUGGESTIONS_СЕРВЕРАSERVER_ПОДСКАЗОК подставить IP подставить конкретное значение.

3. Запустить nginx:

...