|
Saturday, 09 August 2008 11:08 |
Common Apache configuration directives on Windows. Also applicable for Linux or Unix with some modifications.
PHP configuration for Apache on Windows
Requires 2 lines in httpd.conf:
LoadModule php5_module "C:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
Virtual Host
Modify 'hosts' file under C:\WINDOWS\system32\drivers\etc\
127.0.0.1 foo.bar
Insert once in httpd-vhosts.conf:
NameVirtualHost *:80
# Parent folder containing all virtual host folders/sites
<Directory "C:/Documents and Settings/sanjib/My Documents/vhost">
DirectoryIndex index.html index.php
# ExecCGI allows cgi execution
Options Indexes FollowSymLinks ExecCGI
# Allow over riding directives for individual virtual hosts through .htaccess
AllowOverride All
# For local machine development, deny from all users except localhost
Order deny,allow
Deny from all
Allow from 127.0.0.1
# Maps .pl files as cgi files
AddHandler cgi-script .pl
</Directory>
Repeat for each virtual host in httpd-vhosts.conf:
<VirtualHost *:80>
ServerName foo.bar
DocumentRoot "C:/Documents and Settings/sanjib/My Documents/vhost/foo.bar/www"
</VirtualHost>
|
|
Last Updated ( Saturday, 09 August 2008 13:00 )
|