修改nginx配置文件
server {
        listen       80;
        server_name  test_go.flyfly520.club;
        location / {
            proxy_pass http://127.0.0.1:8081/;
        }
}
重启nginx
后台启动gin编译后的文件
nohup ./main&
原文:https://www.cnblogs.com/flyfly123/p/13967176.html