For the purpose of running a webserver on my NixOS installation, I have included the following in my configuration.nix. (Note that I have very little experience with setting up servers and have not found exact definitions of all of the parameters included below.)
 services.httpd = {
    enable = true;
    adminAddr = "localhost";
    extraModules = [ "http2" ];
    virtualHosts = 
    [
      {
        hostName = "localhost";
        documentRoot = "/home/edmund/docroot";
        enableUserDir = true;
        servedDirs = [ { urlPath = "/www"; dir = "/www"; } ];
        serverAliases = [ "localhost" ];
        enableSSL = false;
       }
    ];
  };
However when I try to access the default index.html page through http://localhost on a Firefox browser, the message which comes up is 'Access forbidden! Error 403' (with some additional descriptive text).
Is this because HTTPD_ROOT and the DocumentRoot listed in the httpd.conf file both seem to point to a directory inside /nix/store, which has tightly locked permissions? (Rather than the document root which I specified.)
How can I configure this server to display a page?
Thanks.
