Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
caddy
Commits
efb1c54e
Commit
efb1c54e
authored
Oct 19, 2016
by
Matt Holt
Committed by
GitHub
Oct 19, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1189 from rndmh3ro/more_upstart_scripts
add separate upstart scripts for centos 6 and ubuntu 12.04
parents
3c1957a6
f1342e37
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
1 deletion
+55
-1
dist/init/linux-upstart/README.md
dist/init/linux-upstart/README.md
+1
-1
dist/init/linux-upstart/caddy.conf.centos-6
dist/init/linux-upstart/caddy.conf.centos-6
+28
-0
dist/init/linux-upstart/caddy.conf.ubuntu-12.04
dist/init/linux-upstart/caddy.conf.ubuntu-12.04
+26
-0
No files found.
dist/init/linux-upstart/README.md
View file @
efb1c54e
...
...
@@ -8,7 +8,7 @@ Usage in this blogpost: [Running Caddy Server as a service with Upstart](https:/
Short recap:
*
Download Caddy in
`/usr/local/bin/caddy`
and execute
`sudo setcap cap_net_bind_service=+ep /usr/local/bin/caddy`
.
*
Save the upstart config file in
`/etc/init/caddy.conf`
.
*
Save the
appropriate
upstart config file in
`/etc/init/caddy.conf`
.
*
Ensure that the folder
`/etc/caddy`
exists and that the subfolder .caddy is owned by
`www-data`
.
*
Create a Caddyfile in
`/etc/caddy/Caddyfile`
.
*
Now you can use
`sudo service caddy start|stop|restart`
.
dist/init/linux-upstart/caddy.conf.centos-6
0 → 100644
View file @
efb1c54e
description "Caddy HTTP/2 web server"
start on runlevel [2345]
stop on runlevel [016]
# centos 6 upstart version does not support console
console log
# centos 6 upstart version does not support setuid/setgid
setuid www-data
setgid www-data
respawn
respawn limit 10 5
# centos 6 upstart version does not support reload
reload signal SIGUSR1
# Let's Encrypt certificates will be written to this directory.
env HOME=/etc/caddy
limit nofile 1048576 1048576
script
cd /etc/caddy
rootdir="$(mktemp -d -t "caddy-run.XXXXXX")"
exec /usr/local/bin/caddy -agree -log=stdout -conf=/etc/caddy/Caddyfile -root=$rootdir
end script
dist/init/linux-upstart/caddy.conf.ubuntu-12.04
0 → 100644
View file @
efb1c54e
description "Caddy HTTP/2 web server"
start on runlevel [2345]
stop on runlevel [016]
console log
setuid www-data
setgid www-data
respawn
respawn limit 10 5
# 12.04 upstart version does not support reload
#reload signal SIGUSR1
# Let's Encrypt certificates will be written to this directory.
env HOME=/etc/caddy
limit nofile 1048576 1048576
script
cd /etc/caddy
rootdir="$(mktemp -d -t "caddy-run.XXXXXX")"
exec /usr/local/bin/caddy -agree -log=stdout -conf=/etc/caddy/Caddyfile -root=$rootdir
end script
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment