Matthew Holt
4d78013646
Clean up flags
2015-11-10 19:50:40 -07:00
Matt Holt
a39ed2823e
Merge pull request #332 from coolaj86/coolaj86-alphabetize
...
Alphabetize command line options, add -pidfile
2015-11-10 19:02:39 -07:00
AJ ONeal
4bed399ca4
Alphabetize command line options, vars, and checks
...
As per https://github.com/mholt/caddy/issues/331
2015-11-10 17:52:29 -08:00
AJ ONeal
93c330c4ce
add --pidfile string option
...
As per https://github.com/mholt/caddy/issues/317
2015-11-10 17:44:00 -08:00
Matthew Holt
76ec785e87
ext: Fix panic when URL path is empty
2015-11-10 16:04:02 -07:00
Matthew Holt
e9b9432da5
"-conf stdin" required to pipe in Caddyfile
...
Some programs (Node.js, supervisor, etc.) open a stdin pipe by default and don't use it, causing Caddy to block. It is their error, but we have to try to accommodate unfortunately. To fix this more universally, parent must explicitly set -conf to "stdin" to read from pipe.
2015-11-10 15:06:47 -07:00
Matthew Holt
c31e86db02
caddyfile: Change JSON format to use arrays, not objects
...
Since a directive can appear on multiple lines, the object syntax wasn't working well. This also fixes several other serialization bugs.
2015-11-10 11:49:01 -07:00
Matthew Holt
13557eb5ef
core: Fix bug that caused parent process to block indefinitely
...
The error channel used when starting all the servers must be buffered so that, even if there are no errors at startup, the returns that insert into the error channel will not be blocked, since after startup, nobody is reading that channel anymore.
2015-11-09 11:52:43 -07:00
Matthew Holt
02213402e8
Unexport internal types; improved markdown summaries
2015-11-09 07:45:37 -07:00
Matt Holt
e1f23a1eb7
Merge pull request #326 from PatelNDipen/master
...
Wrote tests for browse.go and redir.go
2015-11-08 09:37:04 -07:00
Dipen Patel
485af2c6ba
removed comment from browse test
2015-11-08 08:40:18 -05:00
Matthew Holt
171fd34b3c
markdown: Make base path optional, always generate links
...
The base path being optional in the Caddyfile is convenient when you just want the whole site to be markdown-enabled. The other change is to always generate links... this is because an index page for markdown files may not be statically generated, but it should still show links. Commit 09341fc
was a regression, and this fixes it.
2015-11-07 20:24:17 -07:00
Dipen Patel
1017142d9b
Made style adjustments to browse and redir tests
2015-11-07 22:17:26 -05:00
Matthew Holt
be9f644425
-host and -port flags affect shorthand caddyfile
2015-11-07 20:03:02 -07:00
Matthew Holt
8628a50b7d
Forgot this one
2015-11-07 17:25:44 -07:00
Matthew Holt
161db70c15
Latest Go 1.4 version
2015-11-07 17:23:16 -07:00
Matthew Holt
e7b8be31cf
This calls for a new beta version
2015-11-07 17:22:41 -07:00
Matthew Holt
e56f7affc9
Show message when activating HTTPS
...
It can take a few seconds...
2015-11-07 17:12:21 -07:00
Dipen Patel
2b1cc77f4b
Wrote tests for browse.go and redir.go
2015-11-07 18:03:21 -05:00
Matthew Holt
18e9aa4d57
Pipe and -conf flag together are an error ( #315 )
2015-11-06 13:22:37 -07:00
Matt Holt
cf5aa1bed1
Merge pull request #323 from tpng/patch-1
...
use log instead of fmt to obey the -log flag
2015-11-06 08:38:51 -07:00
Benny Ng
c35b201685
use log instead of fmt to obey the -log flag
2015-11-06 23:09:40 +08:00
Matt Holt
a1481bc29e
Merge pull request #306 from mholt/bug/websocket-races
...
fixed data races in websockets
2015-11-05 17:19:35 -07:00
Matthew Holt
d34e92ee70
checkDirectives must've slipped through the cracks in big merge
...
Also we're not messing with log flags anymore during parsing. Timestamps could come in handy, plus concurrent logging is going on now.
2015-11-05 17:14:47 -07:00
Matthew Holt
bcea5182c6
Don't truncate process log; more consistent output
2015-11-05 17:01:08 -07:00
Matthew Holt
2fb4810cdb
Fixed racy error reporting at server startup
...
Previously, if a listener fails to bind (for example), there was a race in caddy.go between unblocking the startup waitgroup and returning the error and putting it into errChan. Now, an error is returned directly into errChan and the closing of the startup waitgroup is defered until after that return takes place.
2015-11-05 15:21:13 -07:00
Matthew Holt
411dd7dff5
New -log flag to direct log output to desired place
...
Log file can also be stdout or stderr. Log output is disabled by default now, which makes it more feasible to add more log statements to trace program flow in debugging situations.
2015-11-05 14:07:52 -07:00
Matt Holt
96f04cdc38
Merge pull request #321 from coolaj86/patch-1
...
add helpful suggestion to identify problem
2015-11-05 13:46:58 -07:00
AJ ONeal
b963c7c9ac
add helpful suggestion to identify problem
2015-11-05 12:39:17 -08:00
Matthew Holt
fc7f7dffa8
Prevent panic in case of hung loading sequence ( fixes #315 )
...
This is known to happen if another program spawns Caddy with a stdin pipe but does not close its write end of Caddy's stdin.
2015-11-05 13:31:24 -07:00
Matt Holt
47c5b6c9c4
Merge pull request #305 from buddhamagnet/refactor/lint-vet
...
Lint pacification
2015-11-05 10:25:24 -07:00
buddhamagnet
e23af5e99a
final corrections
2015-11-05 00:44:35 +00:00
buddhamagnet
57f1d3c205
pass golint
...
pass all tests
respond to maintainer comments
reinstate assignment of t
correct typo
correct typo
pass linter some more
2015-11-05 00:40:35 +00:00
Matt Holt
7a159ad934
Merge pull request #313 from mholt/fix-tls-defaults-le
...
Fix regression: Ensure TLS defaults are added by LE handlers.
2015-11-04 16:21:09 -07:00
xenolf
6fdc83faeb
Fix regression: Ensure TLS defaults are added by LE handlers.
2015-11-04 23:53:03 +01:00
Matthew Holt
d36685acdd
letsencrypt: Fix bug if different emails used; beta 2
2015-11-04 12:19:43 -07:00
Matthew Holt
051d2a68c0
Fixed behavior with empty Caddyfile
...
If the -host flag is used, we might still have to set up Let's Encrypt, so this change is necessary.
2015-11-04 09:26:11 -07:00
Austin
34c369155c
trim possible line terminators from message
2015-11-03 13:37:32 -08:00
Matthew Holt
7f7a6abafd
Revised README
2015-11-03 12:39:25 -07:00
Matthew Holt
5e1573dd84
Better error handling at startup and fixed some bugs
...
Fixed bug where manually specifying port 443 disabled TLS (whoops); otherHostHasScheme was the culprit, since it would return true even if it was the same config that had that scheme.
Also, an error at startup (if not a restart) is now fatal, rather than keeping a half-alive zombie server.
2015-11-03 12:01:54 -07:00
Matthew Holt
e8006acf80
Fix -port, -host, and -root flags when Caddyfile is missing
2015-11-03 08:10:16 -07:00
Matt Holt
295d21f37d
Merge pull request #308 from mholt/letsencrypt
...
Let's Encrypt
2015-11-02 21:06:31 -07:00
Matthew Holt
866427491c
Forgot something
2015-11-02 21:02:35 -07:00
Matthew Holt
9905f48c8e
Update changelog and readme
2015-11-02 20:56:13 -07:00
Matthew Holt
0970c058f7
tls: Repair from messy merge
2015-11-02 20:54:38 -07:00
Matthew Holt
ad057ab873
Merge branch 'master' into letsencrypt
...
Conflicts:
caddy/parse/parse.go
caddy/parse/parsing.go
config/config.go
config/setup/controller.go
main.go
server/server.go
2015-11-02 20:26:55 -07:00
Matthew Holt
09341fca12
markdown: Don't generate static site or links unless sitegen is enabled
2015-11-02 20:15:42 -07:00
Matthew Holt
c3e6463676
A few comments, slight tweaks
2015-11-02 19:27:42 -07:00
Matthew Holt
d18cf12f14
letsencrypt: Fixed renewals
...
By chaining in a middleware handler and using newly exposed hooks from the acme package, we're able to proxy ACME requests on port 443 to the ACME client listening on a different port.
2015-11-02 19:27:23 -07:00
Austin
abc7c6a148
fixed data races in websockets
2015-11-02 14:19:38 -08:00