Commit Graph

1283 Commits

Author SHA1 Message Date
María de Antón
1efd1029dd Only bypass "bandwidth limit exceeded" errors on pushes 2016-03-22 16:08:29 +01:00
Matthew Holt
426d165254 expvar: Allow no args; publish number of goroutines 2016-03-21 22:39:57 -06:00
Matt Holt
a3127bed5f Merge pull request #285 from mem/master
Add expvar middleware
2016-03-21 21:54:18 -06:00
Marcelo E. Magallon
b94e513116 Add expvar middleware
Right now it has a very simple configuration:

	expvar /debug/vars

It will return a JSON object with memory statistics and the command line
used to start caddy, which are the two expvars that expvar registers by
default.
2016-03-21 21:46:41 -06:00
Matthew Holt
b6e5a599fb Update change log 2016-03-21 12:36:27 -06:00
Matt Holt
8fc35edc3b Merge pull request #689 from tpng/restart-inproc
Add -restart=inproc option for in-process restart
2016-03-21 12:32:59 -06:00
Benny Ng
260c023e1e Add -restart=inproc flag for in process restart 2016-03-22 02:25:32 +08:00
Matthew Holt
27f9b58c5d Bypass "bandwidth limit exceeded" errors when cloning from googlesource
cf. golang/go#12933
2016-03-21 12:05:16 -06:00
Matthew Holt
f23d8cb37f Add {upstream} placeholder when proxy middleware is used (closes #531)
Middlewares can now make their own placeholders that may be useful in
logging, on a per-request basis. Proxy is the first one to do this.
2016-03-20 21:56:13 -06:00
Matthew Holt
3f49b32086 Revert undesired changes to shell scripts 2016-03-20 14:13:50 -06:00
Matt Holt
0aacaea918 Merge pull request #686 from wmark/for-mholt
Reflow all bash scripts
2016-03-20 14:04:44 -06:00
Matt Holt
9e0b1b4216 Merge pull request #687 from abiosoft/fastcgi-except
fastcgi: Add `except` to FastCGI. Minor refactor in proxy.
2016-03-20 13:42:14 -06:00
Abiola Ibrahim
e7001e6538 Add except to FastCGI. Minor refactor in proxy. 2016-03-20 08:02:17 +01:00
Matthew Holt
4d9741dda6 pprof: Only handle if path matches /debug/pprof, add tests 2016-03-19 20:02:05 -06:00
W-Mark Kubacki
74a5cb2fe3 Convert the barbarism in dist/automate.sh to proper BASH structure
When thy variables henceforth accept blessed white-space,
    guided will thy scripture be along righteous path(s).

    -- 4 BASH 3:42

Caddy's dist files sometimes ended up being owned by matt:staff or other
quite arcane and/or frightening names. If someone extracting didn't pay
attention a regular user who happened to have same uid by accident could
later tamper with the files' contents. It's 0:0 from now on.

Use all available threads when packaging distributables
Caddy binaries will be added to their archives in-place: This change
eliminates them being renamed within dist/builds one after another.
As does 'gox', dist/automate.sh will spare one available thread if possible.
2016-03-20 01:33:58 +01:00
W-Mark Kubacki
ba2e9d80fd Use best practices in build.bash
Format of main.buildDate has been locale-dependent,
and is now ISO-8601 compliant.

Caddy displayed with ```-version``` something like (mind the datetime format):

    Caddy 0.8.2 (+591b209 Fri Mar 18 21:22:55 UTC 2016)
     2 files changed, 9 insertions(+), 4 deletions(-)
    build.bash
    main.go

which is now:

    Caddy 0.8.2 (+591b209 2016-03-18 21:22:55Z)
     2 files changed, 9 insertions(+), 4 deletions(-)
    build.bash,main.go

See also:

 * http://wiki.bash-hackers.org/scripting/obsolete
 * https://google.github.io/styleguide/shell.xml
 * https://xkcd.com/1179/
2016-03-19 17:04:53 +01:00
Abiola Ibrahim
a05a664d56 Merge pull request #679 from abiosoft/case-insensitive-fs
Support for case insensitive paths using CASE_SENSITIVE_PATH env var.
2016-03-19 08:53:18 +01:00
Abiola Ibrahim
9f9fbf2e1b Support for case insensitive paths using CASE_SENSITIVE_PATH environment variable. 2016-03-19 08:45:23 +01:00
Matt Holt
63e4352db7 Merge pull request #612 from captncraig/pprof
pprof: Adding pprof middleware for profiling caddy.
2016-03-18 15:45:57 -06:00
Craig Peterson
640a0ef956 Adding pprof middleware for debugging purposes 2016-03-18 10:39:29 -06:00
Matt Holt
591b209024 Merge pull request #685 from wmark/for-mholt
Update unit files for systemd
2016-03-18 08:51:40 -06:00
W-Mark Kubacki
f1c1ea9905 Service file for systemd starts after all networks have gotten IP addresses
Unlike network.target the network-online.target guarantees that the network
devices are online.

If you bind to 0.0.0.0, [::], [::1], and/or 127.0.0.1 only that is enough to
proceed. But in case a particular IP is needed, like ${COREOS_PUBLIC_IPV4},
we require any IP assignments to have completed before Caddy's start. That
is achieved by depending on systemd-networkd-wait-online.service (which is
scheduled before network-online.target, then, automatically).
2016-03-18 12:36:54 +01:00
Abiola Ibrahim
6b801b111b Merge pull request #684 from abiosoft/master
Fix for #659.
2016-03-18 07:08:24 +01:00
Matthew Holt
717c88ec0f Update contributing notes 2016-03-17 21:16:31 -06:00
Matt Holt
03a22aeb7e Merge pull request #683 from klingtnet/feat/systemd
systemd unit file
2016-03-17 21:05:12 -06:00
Matthew Holt
18332df358 Refactor output out of Start() 2016-03-17 17:58:40 -06:00
Matthew Holt
b9f8c183fa gofmt! 2016-03-17 16:43:50 -06:00
Matthew Holt
37d050922b Fix typo, clarify readme 2016-03-17 16:42:28 -06:00
Abiola Ibrahim
04514fb791 Fix for #659. 2016-03-17 22:29:58 +01:00
Andreas Linz
6c2bf36dab Add systemd unit file and some usage instructions
Add systemd service file for caddy

Add some README with basic setup instructions

Explain how to view the service configuration

Add a note about permissions

Add a comment about run user and group

service->service unit

A systemd service can consist of different units. A unit configuration
file has the `.service` file ending which is a bit confusing, so please
be considerate if I'm confusing `service` and `unit` in the README

Fix typos/reword

Add contact information
2016-03-17 17:39:50 +01:00
Matt Holt
4f5fe2de24 Merge pull request #662 from mholt/md-include-fix
markdown: Included files in Markdown templates have access to document vars
2016-03-16 13:56:06 -06:00
Matthew Holt
90c24d2f32 Included files in Markdown templates have access to document vars (fixes #660)
Refactor how middleware.Context includes files
2016-03-16 13:42:16 -06:00
Matthew Holt
d95c21ded5 Update readme with build script and link to CLI docs 2016-03-16 11:46:10 -06:00
Matthew Holt
4f4b34d481 Update changelog 2016-03-16 11:46:10 -06:00
Matthew Holt
ed0342f171 Fix tests on Go tip (caused by golang/go#14827) 2016-03-16 11:46:10 -06:00
Matt Holt
f14cdcc436 Merge pull request #682 from weingart/mime_fix
mime: Use a map, and error on duplicate extensions.
2016-03-16 08:40:10 -06:00
Tobias Weingartner
b471b7e835 Fixup mime middleware to use a map and error on duplicate extensions.
- The mime middleware used filepath where it should arguably use path.
 - Changed the configuration to use a map instead of scanning an array
   during every request.  The map is static (after configuration), so
   should be fine for concurrent access.
 - Catch duplicate extensions within a configuration and error out.
 - Add tests for new error case.
2016-03-15 23:11:19 -07:00
Matt Holt
b79ff7403f Merge pull request #664 from jupiter/max-connections
proxy: Add max_conns parameter for per-host maximum connections
2016-03-14 15:25:44 -06:00
Matt Holt
7560778602 Merge pull request #673 from ERIIX/master
Play nice when ACME used manually.
2016-03-13 14:50:33 -06:00
Matt Holt
fc10951dde Merge pull request #676 from abiosoft/list-directives
Add flag to list directives.
2016-03-13 14:49:10 -06:00
Matt Holt
3e48e6a535 Merge pull request #657 from dprandzioch/feature/freebsd-service-script
Folder for init scripts within dist / FreeBSD service script
2016-03-13 14:46:06 -06:00
Abiola Ibrahim
44fc9b18a6 Print the directives in order of priority. 2016-03-13 18:29:26 +01:00
Abiola Ibrahim
3b6c387b84 Add flag to list directives. 2016-03-13 12:59:35 +01:00
Matthew Holt
35e4c1a7bf Sanity checkL this defer does not leak fds; comment added 2016-03-12 16:32:12 -07:00
Abiola Ibrahim
25bfdfe92c Merge pull request #672 from abiosoft/master
Hide only the currently used Caddyfile
2016-03-12 20:46:20 +01:00
Abiola Ibrahim
008ad398ce Hopefully, this is the final nail on the coffin. 2016-03-12 17:47:53 +01:00
Eric R. Monson
52d7379063 Play nice when ACME used manually.
Minor change to server/server.go such that /.well-known/acme-challenge
can be passed through when TLS.Manual is true on the vhost the request
came in through.
2016-03-11 22:37:54 -08:00
Abiola Ibrahim
e92a911e7d Add more tests. 2016-03-11 23:44:50 +01:00
Abiola Ibrahim
84845a66ab Fix broken build. 2016-03-11 23:11:21 +01:00
Matt Holt
e2f6ab3472 Merge pull request #671 from shawnps/patch-1
capitalize struct name in comment (go lint)
2016-03-11 08:21:56 -07:00