[Nix-dev] Getting apache to interpret .php as index files

Tony White tonywhite100 at googlemail.com
Sun Jul 26 09:18:05 CEST 2009


Hi all,
Does anyone know the correct method to enable apache to interpret .php
index files as it would do html files? I'm using the new configuration
method and the default is just to list the php files in the browser.
I have tried in configuration.nix :

	  httpd = {

	  enable = true;
	  experimental = true;
	  mod_php = true;
	  extraModules = [
	  {
	  name = "php5"; path = "${pkgs.php}/modules/libphp5.so";
	  }
	  "dbd"
	  ];

	  extraConfig = [
	  "AddType application/x-httpd-php .php .phtml"
	  "/<IfModule mod_dir.c/>
	  DirectoryIndex index.php index.htm index.html
	  /</IfModule/>"
	  ];

	  virtualHosts = [
         {
	  hostName = "localhost";
         documentRoot = "/www";
         }

	  ];
	  adminAddr = "doNotReply at localhost";

	  };	# End httpd entries


The extraConfig section is the part of interest, it's obviously wrong.
Does anyone know what to use instead?

Thanks,
Tony



More information about the nix-dev mailing list