0
0

More than 1 year has passed since last update.

echo(go-lang)のプロキシをnginxで構築する

Posted at

目的

echoに対するアクセスログを取得したい時に、nginxをプロキシとして構築する。

構築

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

    server_name www.example.com
    location /api/ {
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_set_header Host $host;

      proxy_pass http://golang:8080/;
    }

    location / {
        root /var/www/html;
        index index.html;
    }
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0