Virtual Host Problem - WinXP Home, Apache 1.3.31, PHP 4.3.8
| From: | operationsengineer1 at yahoo dot com | Date: | Wed, 08 Sep 2004 02:11:42 +0000 |
| Subject: | Virtual Host Problem - WinXP Home, Apache 1.3.31, PHP 4.3.8 | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-24543@lists.php.net to get a copy of this message | ||
Hi all, i'm having trouble getting virtual hosting to recognize subdirectories of my root
directory. i go over my phpini, hosts and httpd.conf file additions/edits and then i discuss the
unexpected results that i'm getting. tia for any suggestions to get back to the land of the
expected.
PHP.INI FILE
doc_root = "c:\web"
extension_dir = "c:\php\extensions"
extension=php_pgsql.dll
extension=php_dbg.dll-4.3.6
HOSTS
127.0.0.1 localhost
127.0.0.1 site1.com
HTTPD.CONF
ServerName localhost
...
DocumentRoot "C:/web"
...
<Directory "C:/web">
...
DirectoryIndex index.php index.htm index.html
...
SetEnv PHPRC "c:/php"
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .htm
AddType application/x-httpd-php .html
Action application/x-httpd-php "/php/php.exe"
...
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
DocumentRoot "C:/web"
ServerName site1.com
</VirtualHost>
when i type in localhost or site1.com into my browser, i'm taken to the index.php file in
c:\php as one wouold expect. however, when i update my virtualhost directive to...
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
DocumentRoot "C:/web/site1"
ServerName site1.com
</VirtualHost>
then i get taken right back to C:/web instead of C:/web/site when i type in site1.com. i can't
get apache to recognize lower level folders using the virtualhost directive.
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!