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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Um servidor HTTPS com capacidade para servir múltiplos domínios simultaneamente
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
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"
}
}
Para executar basta chamar ./server
isso vai subir o servidor mas para deixar rodando em segundo plano faça da seguinte maneira:
p ./server&