Commit Graph

43 Commits

Author SHA1 Message Date
Matthew Holt
6936658019 letsencrypt: Work with latest lego changes 2015-10-25 19:30:29 -06:00
Matthew Holt
b5b31e398c letsencrypt: Graceful restarts
Lots of refinement still needed and runs only on POSIX systems. Windows will not get true graceful restarts (for now), but we will opt for very, very quick forceful restarts. Also, server configs are no longer put into a map; it is critical that they stay ordered so that they can be matched with their sockets in the child process after forking.

This implementation of graceful restarts is probably not perfect, but it is a good start. Lots of details to attend to now.
2015-10-25 18:45:55 -06:00
Matthew Holt
a16beb98de letsencrypt: Revoke certificate 2015-10-21 00:09:45 -06:00
Matthew Holt
a3a826572f Refactor letsencrypt code into its own package 2015-10-17 20:17:24 -06:00
Matthew Holt
0a1e472fc2 Merge branch 'configfix' into letsencrypt
Conflicts:
	config/config.go
2015-10-16 11:40:44 -06:00
Matthew Holt
4e92c71259 LE flags, modified tis directive, moved LE stuff to own file 2015-10-16 11:38:56 -06:00
Matthew Holt
0c07f7adcc Epic revert of 0ac8bf5 and adding OncePerServerBlock
Turns out having each server block share a single server.Config during initialization when the Setup functions are being called was a bad idea. Sure, startup and shutdown functions were only executed once, but they had no idea what their hostname or port was. So here we revert to the old way of doing things where Setup may be called multiple times per server block (once per host associated with the block, to be precise), but the Setup functions now know their host and port since the config belongs to exactly one virtualHost. To have something happen just once per server block, use OncePerServerBlock, a new function available on each Controller.
2015-10-14 23:45:28 -06:00
Zac Bergquist
f9bc74626d Address various lint and gocyclo warnings. Fixes #253 2015-10-11 16:28:02 -04:00
Benoit Benedetti
5d32af8a6b Fix typo in loadConfigs comment 2015-09-08 22:38:30 +02:00
Benoit Benedetti
ed10863494 Configuration as command line arg #222 2015-09-08 22:27:05 +02:00
Matthew Holt
e4643f048a core: Bind all listeners to wildcard host by default (closes #208)
This behavior can still be overridden by bind directive
2015-08-05 07:37:51 -06:00
Matthew Holt
0ac8bf58ea core: Run startup/shutdown functions only once
Even if defined for multiple hosts. Startup or shutdown callbacks registered by any directive (startup, shutdown, markdown, git, log, etc.) will only run as many times as it appears in the Caddyfile, not repeated for each host that shares that server block. Fixing this involved refactoring three packages (yeesh) and we need to restore some tests that are no longer valid (that used to verify splitting a multiServerBlock into multiple serverBlocks).
2015-08-01 13:08:31 -06:00
Matthew Holt
1a82943db2 core: Simplify Server initializer 2015-07-11 12:00:21 -06:00
Joshua Poehls
36bc3a453f Tweaked ulimit warning message. 2015-05-22 20:24:48 -05:00
Joshua Poehls
04fd7ce9e1 Updated ulimit warning message to include the recommended min value. 2015-05-22 19:34:00 -05:00
Matthew Holt
d311345aa5 Fix for running ulimit check 2015-05-21 11:21:08 -06:00
Matthew Holt
ce6e30c09e Lil' bit of godoc 2015-05-21 00:40:58 -06:00
Matthew Holt
ee754b4a47 Bug fixes 2015-05-21 00:40:05 -06:00
Matthew Holt
5f72b7438a Created app package, and better TLS compatibility with HTTP/2 2015-05-21 00:06:53 -06:00
Matthew Holt
ea9607302a Whoops 2015-05-20 20:50:19 -06:00
Matthew Holt
26bb17337e Warn if ulimit is too low when serving production sites 2015-05-20 20:46:27 -06:00
Matthew Holt
e42c6ab520 Notice displayed if non-localhost hosts resolve to loopback 2015-05-20 20:06:30 -06:00
Matthew Holt
2ce5102473 Add -version flag 2015-05-07 13:09:40 -06:00
Matthew Holt
abe3e5f597 Move flag.Parse() to main() in case other packages use flags 2015-05-06 14:57:32 -06:00
Matthew Holt
898896f9e0 Fix for stdin on Windows 2015-05-06 09:16:10 -06:00
Matthew Holt
b2549c317c Minor flag help text change; go fmt 2015-05-05 23:19:14 -06:00
Abiola Ibrahim
70d6caf95b server: read -conf flag before reading stdin config file 2015-05-06 03:31:25 +01:00
Matthew Holt
2dbd14b6dc Consistent app name/version info; pipe config data through stdin 2015-05-04 16:23:16 -06:00
Matthew Holt
995edf0566 Bringing in latest from master; refactoring under way 2015-05-04 11:02:46 -06:00
Matthew Holt
7ee3653342 core: Kill whole process if any server fail to start 2015-05-01 13:35:57 -06:00
Matthew Holt
27722463a7 -host flag to set default host 2015-04-29 22:30:12 -06:00
Matthew Holt
d00bb87f17 -port flag to override default port
Default port used if none is specified in config
2015-04-28 22:13:00 -06:00
Matthew Holt
46f5325c15 More accurate initialization output 2015-04-24 20:09:31 -06:00
Matthew Holt
aa89b95075 Replaced cpu directive with command line flag 2015-04-24 20:08:14 -06:00
Matthew Holt
dd3ff0fcb5 Shows site addresses at start; new -quiet flag 2015-04-23 13:28:05 -06:00
Matthew Holt
9a27beb79c Quick bug fix for empty Caddyfile 2015-04-18 09:53:43 -06:00
Matthew Holt
feec7c5b40 Virtual hosts and SNI support 2015-04-15 14:11:32 -06:00
Matthew Holt
abeb337f45 Refactored rewrite middleware 2015-04-11 16:58:34 -06:00
Matthew Holt
d0a0216602 Added flag to disable http/2 support (still enabled by default) 2015-04-09 10:08:22 -06:00
Matthew Holt
2dc39feabd Tweak to parser and main's error handling 2015-03-28 16:24:00 -06:00
Matthew Holt
24fc2ae59e Major refactoring; more modular middleware 2015-01-18 23:11:21 -07:00
Matthew Holt
04162aaa79 Added flag to specify config file location 2015-01-13 16:22:16 -07:00
Matthew Holt
4497a16fb0 Early prototype; initial commit 2015-01-13 12:43:45 -07:00