目的
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;
}
}