1

I'm using the following config:

services.httpd =
  {
    enable = true;
    adminAddr = "localhost";

    extraModules =
    [
      "http2" 
    ];
    enablePHP = true;

    virtualHosts =
    [
      {
        hostName = "localhost";
        documentRoot = "/var/www/html/html-geo";
        serverAliases =
        [
          "localhost"
        ];
        enableSSL = false;
      }
    ];
  };

  users.users.http =
  {
    isNormalUser = true;
    home = "/etc/user/http";
  };

However this results in the following error:

Mar 21 15:23:44 nixos httpd[21707]: httpd: Syntax error on line 69 of /nix/store/dp6kc224raib72dk8g2lahrr3a1drk8j-httpd.conf: Cannot load /nix/store/bp2jirc0zwa46rb3xm62xjc8bsvknavc-apache-httpd-2.4.35/modul>

1
  {name = "php7"; path = "${pkgs.php}/modules/libphp7.so";}

I needed to add the above into extraModules.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.