Skip to content

Instantly share code, notes, and snippets.

@naokij
naokij / caddy.service
Created September 19, 2016 02:39
caddy systemd unit file
[Unit]
Description=Caddy HTTP/2 web server
Documentation=https://caddyserver.com/docs
After=network-online.target
Wants=network-online.target systemd-networkd-wait-online.service
[Service]
Restart=on-failure
@naokij
naokij / validate_ldap.go
Last active May 15, 2017 09:30
ldap验证
package controllers
import (
"errors"
"fmt"
"bitbucket.org/emagine/vdrill-cp/config"
"gopkg.in/ldap.v2"
)
@naokij
naokij / Caddyfile
Last active May 26, 2017 14:20
MinDoc 部署文件
#请替换成你的网址
https://doc.example.com {
#将下面的路径替换成你的MinDoc路径
root /go/src/github.com/lifei6671/godoc/
proxy / localhost:8181 {
header_upstream Host {host}
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-For {remote}
header_upstream X-Forwarded-Proto {scheme}
except /static /uploads /cache
@naokij
naokij / static_cdn.vcl
Created January 14, 2020 09:05
static_cdn.vcl
vcl 4.0;
import http;
import directors;
# We define the origin servers
# assumption they listen on port 80, please change it if not true
backend origin_a {
.host = "103.234.96.112";
.port = "80";
}