오픈소스/nginx

nginx for beego

세모데 2018. 2. 2. 17:14

1. 테스트 소스


https://github.com/beego/samples/tree/master/todo

go build

./main



2. nginx 설정

 

server { 

    listen       80; 

    server_name  beego.test.com; 

    access_log  /var/log/nginx/beegodemo-access.log  combined; 

    location = /favicon.ico { access_log off; log_not_found off; } 

    location / { 

         proxy_pass http://127.0.0.1:8080; 

         proxy_http_version 1.1; 

         proxy_set_header Upgrade $http_upgrade; 

         proxy_set_header Connection "upgrade"; 

    }