Unverified Commit 8d69e1fa authored by Jonas Heinrich's avatar Jonas Heinrich Committed by GitHub
Browse files

nixos/wordpress: Use https by default for caddy (#375375)

parents 2d6dc331 f1c4d339
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -445,6 +445,10 @@
  For those unable to upgrade yet, there is a [v0 compatibility mode](https://www.openpolicyagent.org/docs/v1.0.1/v0-compatibility/)
  available too.

- Wordpress with the Caddy webserver (`services.wordpress.webserver = "caddy"`) now sets up sites with Caddy's automatic HTTPS instead of HTTP-only.
  Given a site example.com, http://example.com now 301 redirects to https://example.com.
  To keep the old behavior for a site `example.com`, set `services.caddy.virtualHosts."example.com".hostName = "http://example.com"`.

- `vscode-utils.buildVscodeExtension` now requires pname as an argument

- The behavior of `services.hostapd.radios.<name>.networks.<name>.authentication.enableRecommendedPairwiseCiphers` was changed to not include `CCMP-256` anymore.
+1 −1
Original line number Diff line number Diff line
@@ -545,7 +545,7 @@ in
    services.caddy = {
      enable = true;
      virtualHosts = mapAttrs' (hostName: cfg: (
        nameValuePair "http://${hostName}" {
        nameValuePair hostName {
          extraConfig = ''
            root    * /${pkg hostName cfg}/share/wordpress
            file_server
+2 −2
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ rec {
              };
            };

            networking.firewall.allowedTCPPorts = [ 80 ];
            networking.firewall.allowedTCPPorts = [ 80 443 ];
            networking.hosts."127.0.0.1" = [
              "site1.local"
              "site2.local"
@@ -106,7 +106,7 @@ rec {
            machine.wait_for_unit(f"phpfpm-wordpress-{site_name}")

            with subtest("website returns welcome screen"):
                assert "Welcome to the famous" in machine.succeed(f"curl -L {site_name}")
                assert "Welcome to the famous" in machine.succeed(f"curl -k -L {site_name}")

            with subtest("wordpress-init went through"):
                info = machine.get_unit_info(f"wordpress-init-{site_name}")