Posted: Wed 23rd Jul 2008@09:26
I know this may seem a little simple, but it took me a while to work this one out.
I was trying to get my installation of XAMPP to allow me to put php_value values into my .htacces file, for a site defined in a <VirtualHost> block. e.g. .htaccess file contents:
php_value include_path C:\...~pathtodomain~...
php_value auto_prepend_file config.php
RewriteEngine on
RewriteBase /
RewriteRule !\.[a-z]{2,4}$ urlparser.php
[Wed Jul 23 10:15:47 2008] [alert] [client 127.0.0.1] C:/...~pathtodomain~.../public_html/.htaccess: php_value not allowed here
AuthConfig block into my httpd.conf (or httpd-vhosts.conf / httpd-userdir.conf) file. But as it turns out, you cant just put that into a virtual host file, but you have to enclose it into a <Directory> block.
<VirtualHost mydomainame.co.uk.local:80>
DocumentRoot "C:\...~pathtodomain~...\public_html"
ServerName mydomainame.co.uk.local
<Directory "C:\...~pathtodomain~...\public_html">
AllowOverride All
</Directory>
</VirtualHost>
AllowOverride All should probably be used very carefully, and should probably have been AllowOverride AuthConfig. I found it to be a little flakey however, as Apache seemed to fail a few times when I try to start it with the above. Maybe I'm not giving it time to shut down correctly between restarts?.local domain is defined in my hosts file, to allow this .local domain to point to my local machine (see see Wikpedia)Actions:
Trackbacks Disabled,
Permalink,