go-br/server

Name: server

Owner: go-br

Description: Um servidor HTTPS com capacidade para servir múltiplos domínios simultaneamente

Created: 2018-04-06 00:42:45.0

Updated: 2018-04-19 11:50:11.0

Pushed: 2018-04-13 02:08:40.0

Homepage: null

Size: 5

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

HTTPS Server

Um servidor HTTPS com capacidade para servir múltiplos domínios simultaneamente

Como compilar

Para compilar basta o seguinte:

uild

Supondo que você esta em usando Windows ou macOS e quer compilar para Linux, faça assim:

=linux CGO_ENABLED=0 go build
Configurando

A configuração é propositalmente bem simples, apenas um arquivo JSON como no exemplo:


{
    "pattern": "example1.com/",
    "root": "assets.example1.com",
    "key": {
        "certFile": "/etc/letsencrypt/live/example1.com/fullchain.pem",
        "keyFile": "/etc/letsencrypt/live/example1.com/privkey.pem"
    }
},
{
    "pattern": "example2.com/",
    "root": "example2.com",
    "key": {
        "certFile": "/etc/letsencrypt/live/example2.com/fullchain.pem",
        "keyFile": "/etc/letsencrypt/live/example2.com/privkey.pem"
    }
}

Executando

Para executar basta chamar ./server isso vai subir o servidor mas para deixar rodando em segundo plano faça da seguinte maneira:

p ./server&

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.