1. 13 Aug, 2019 2 commits
  2. 19 Jul, 2019 3 commits
  3. 18 Jul, 2019 4 commits
    • George Hartzell's avatar
      Add doc re running as non-root user on FreeBSD (#2655) · d411b7d0
      George Hartzell authored
      Add a README.md in `dist/init/freebsd` that describes how to configure
      the system so that `caddy` can be run without root privileges.
      d411b7d0
    • George Hartzell's avatar
      Use syslog to manage caddy std{out,err} on FreeBSD (#2652) · 580f7677
      George Hartzell authored
      * Use syslog to manage caddy std{out,err} on FreeBSD
      
      There is no good way to rotate the logfile created by the previous
      FreeBSD rc.d script (it's the result of redirecting std{out,err} and
      is held open by the shell).
      
      This solves the problem by sending caddy's std{out,err} stream to
      syslog, using the daemon command's builtin functionality.
      
      It replaces the old `caddy_logfile` rc.conf variable with
      `caddy_syslog_facility` (which defaults to 'local7') and
      `caddy_syslog_level` (which defaults to 'notice').
      
      By default, these messages will end up in /var/log/messages but can
      be redirected as documented in the script's comments.
      
      * Add info about rotating log with newsyslog
      
      If you create a caddy specific logfile in `/var/log`, you should
      rotate it.
      
      This adds a bit of info to the dist/init/freebsd/README.md about
      rotating that log file with newsyslog.
      580f7677
    • rouzier's avatar
      staticfiles: Support pre-compressed zstd, make etag content-encoding-aware (#2626) · 120811e7
      rouzier authored
      * Add support for precompressed zstd files (rfc8478)
      
      * Avoid the hash lookup for the file extension.
      
      * Only calculate Etag once
      120811e7
    • aspeteRakete's avatar
      Updated systemd caddy.service (#2620) · 43458bda
      aspeteRakete authored
      According to https://github.com/systemd/systemd/blob/v241/NEWS#L2799
      The Directive ReadWriteDirectories= has been renamed to ReadWritePaths=
      in 241.
      43458bda
  4. 11 Jul, 2019 1 commit
  5. 02 Jul, 2019 2 commits
  6. 01 Jul, 2019 1 commit
  7. 23 Jun, 2019 1 commit
    • Damir Vandic's avatar
      Fix graceful shutdown (#2618) · 6f019285
      Damir Vandic authored
      Currently, the instance waitgroup is decremented twice in `startServers()`: once when `Serve()` is finished and once when `ServePacket()` is finished. However, with a graceful shutdown, `Serve()` returns before the server has actually finished shutting down all active connections. This patch increases the wait group by one when the server is shut down so that the program only exits when all the server instances have finished serving their connections.
      6f019285
  8. 21 Jun, 2019 2 commits
  9. 19 Jun, 2019 6 commits
  10. 12 Jun, 2019 1 commit
  11. 11 Jun, 2019 1 commit
    • Jared Ririe's avatar
      caddytls: Fix goroutine leak when restarting Caddy (#2644) · d11b6481
      Jared Ririe authored
      Each time the Caddyfile reloads and Caddy is restarted,
      caddytls.NewConfig starts a goroutine for cleaning the
      certificate storage. This goroutine ranges over a time.Ticker
      channel; although Stop is called on this ticker, Stop does
      not close the underlying channel so the goroutine never exits.
      
      This change adds an additional channel that is listened to
      in the certificate cleaning goroutine so it can exit
      on restarts.
      d11b6481
  12. 27 May, 2019 2 commits
  13. 24 May, 2019 2 commits
    • AndreKR's avatar
      Simple rewrite regex captures (#2592) · 4bad5c79
      AndreKR authored
      * More informative rewrite test output
      
      When running rewrite tests, the output in case of a test failure now
      includes not only the rewritten URLs but also the from URL.
      
      * Move re-escaping to regexpMatches
      
      This commit moves the code to post-process the match replacements from
      ComplexRule to regexpMatches, so it can later be re-used for SimpleRule.
      
      Also changes the comment in an attempt to better explain the reasoning
      behind that code.
      
      The required strings.Replacer is now built only once.
      
      * Support regex captures in simple rewrite rules
      
      Closes #2586
      4bad5c79
    • Łukasz Nowak's avatar
      81430e4a
  14. 14 May, 2019 1 commit
  15. 26 Apr, 2019 1 commit
  16. 24 Apr, 2019 1 commit
  17. 22 Apr, 2019 1 commit
    • Taufiq Rahman's avatar
      fix lint warnings (issue 2541) (#2551) · c32a0f5f
      Taufiq Rahman authored
      * Lint: fix some errcheck #2541
      
      * Lint: fix passing structcheck #2541
      
      * Lint: update fix structcheck #2541
      
      * Lint: fix errcheck for basicauth, browse, fastcgi_test #2541
      
      * Lint: fix errcheck for browse, fastcgi_test, fcgiclient, fcgiclient_test #2541
      
      * Lint: fix errcheck for responsefilter_test, fcgilient_test #2541
      
      * Lint: fix errcheck for header_test #2541
      
      * Lint: update errcheck for fcgiclient_test #2541
      
      * Lint: fix errcheck for server, header_test, fastcgi_test, https_test, recorder_test #2541
      
      * Lint: fix errcheck for tplcontext, vhosttrie_test, internal_test, handler_test #2541
      
      * Lint: fix errcheck for log_test, markdown mholt#2541
      
      * Lint: fix errcheck for policy, body_test, proxy_test #2541
      
      * Lint: fix errcheck for on multiple packages #2541
      
      - reverseproxy
      - reverseproxy_test
      - upstream
      - upstream_test
      - body_test
      
      * Lint: fix errcheck in multiple packages mholt#2541
      - handler_test
      - redirect_test
      - requestid_test
      - rewrite_test
      - fileserver_test
      
      * Lint: fix errcheck in multiple packages mholt#2541
      
      - websocket
      - setup
      - collection
      - redirect_test
      - templates_test
      
      * Lint: fix errcheck in logger test #2541
      
      run goimports against #2551
      - lexer_test
      - log_test
      - markdown
      
      * Update caddyhttp/httpserver/logger_test.go
      Co-Authored-By: default avatarInconnu08 <taufiqrx8@gmail.com>
      
      * Update log_test.go
      
      * Lint: fix scope in logger_test #2541
      
      * remove redundant err check in logger_test #2541
      
      * fix alias in logger_test #2541
      
      * fix import for format #2541
      
      * refactor variable names and error check #2541
      c32a0f5f
  18. 20 Apr, 2019 8 commits