httpd: Add option for specifying robots.txt
This commit is contained in:
parent
837a0c05e5
commit
0de982d75b
@ -209,10 +209,11 @@ let
|
||||
'';
|
||||
|
||||
robotsTxt =
|
||||
concatStringsSep "\n" (
|
||||
concatStringsSep "\n" (filter (x: x != "") (
|
||||
# If this is a vhost, the include the entries for the main server as well.
|
||||
(if isMainServer then [] else map (svc: svc.robotsEntries) mainSubservices)
|
||||
++ (map (svc: svc.robotsEntries) subservices));
|
||||
(if isMainServer then [] else [mainCfg.robotsEntries] ++ map (svc: svc.robotsEntries) mainSubservices)
|
||||
++ [cfg.robotsEntries]
|
||||
++ (map (svc: svc.robotsEntries) subservices)));
|
||||
|
||||
in ''
|
||||
ServerName ${serverInfo.canonicalName}
|
||||
|
@ -142,9 +142,19 @@ with lib;
|
||||
type = types.str;
|
||||
default = "common";
|
||||
example = "combined";
|
||||
description = "
|
||||
description = ''
|
||||
Log format for Apache's log files. Possible values are: combined, common, referer, agent.
|
||||
";
|
||||
'';
|
||||
};
|
||||
|
||||
robotsEntries = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = "Disallow: /foo/";
|
||||
description = ''
|
||||
Specification of pages to be ignored by web crawlers. See <link
|
||||
xlink:href='http://www.robotstxt.org/'/> for details.
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user