Skip to content

Instantly share code, notes, and snippets.

@naokij
Last active May 26, 2017 14:20
Show Gist options
  • Save naokij/260f0551729c74246c8b73fee680336e to your computer and use it in GitHub Desktop.
Save naokij/260f0551729c74246c8b73fee680336e to your computer and use it in GitHub Desktop.
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
}
}
[Unit]
Description=MinDoc service
After=network.target
[Service]
#这里路径要改成你的mindoc路径
WorkingDirectory=/go/src/github.com/lifei6671/godoc/
ExecStart=/go/src/github.com/lifei6671/godoc/godoc
LimitNOFILE=65535
Restart=on-failure
#User=bdemo
#Group=bdemo
[Install]
WantedBy=multi-user.target
#安装路径/etc/systemd/system
#systemctl start mindoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment