I've installed Zend Server CE 5.1.0 on Windows 7 Ultimate 64 bit in its default location, meaning the path to my htdocs is C:\Program Files (x86)\Zend\Apache2\htdocs. Not something that I would like to type each time I check out a project from SVN in Eclipse or something.

I'd like to set the DocumentRoot to a different folder, namely D:\www.

What I've done

I edited conf/httpd.conf, with the significant lines being:

DocumentRoot "D:\www"
<Directory "D:\www">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
Include conf/extra/httpd-vhosts.conf

I edited conf/extra/httpd-vhosts.conf to add a virtual host:

NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot              D:\www
    ServerName                localhost
    ServerAlias               localhost
    SetEnv APPLICATION_ENV    development
    SetEnv APPLICATION_DOMAIN localhost

<VirtualHost *:80>
    DocumentRoot              D:\www\UmbraCMS
    ServerName                umbracms.local
    ServerAlias               umbracms.local
    SetEnv APPLICATION_ENV    development
    SetEnv APPLICATION_DOMAIN umbracms.local

I edited C:\Windows\System32\drivers\etc\hosts to add this line: umbracms.local

And I also added a PHP project to D:\www\UmbraCMS. And restarted Apache. Actually, I restarted the computer, too, just in case.

What's supposed to happen

After typing http://umbracms.local/ in the browser's address bar, I want to see my PHP project launch, obviously.

What's actually happening

No matter whether whether I type http://umbracms.local/ or http://localhost/, I'm taken to the test zend page, located in C:\Program Files (x86)\Zend\Apache2\htdocs\index.html, as if neither DocumentRoot was changed nor name-based virtual hosting worked.

Interestingly, when I put another project in C:\Program Files (x86)\Zend\Apache2\htdocs\bugraid\ and then, in the browser, typed http://localhost/bugraid, the project actually opened, or at least tried to, as it completely ignored the project's .htaccess file.

Extra considerations

Zend Server's Apache version is 2.2.16, PHP version is 5.3.0

I've installed MySQL CE 5.5.13 separately, and it works, both from command line and via MySQL Workbench.

I have XAMPP installed, but none of its components are started up. It's got its own install of Apache 2.2.17 and MySQL 5.5.1. PHP version is 5.3.5 (I think).


Have you had a similar situation before? What else might need taking care of in order to have Zend Server's Apache use D:\www as document root for my PHP projects?


Doesn't vista play tricks with administrator-owned files that your user edits, basically making copies that only your user sees? I believe it is "filesytem redirection" -- try runas + administrator and you'll see httpd.conf is not really changed.

  • Interesting info, I wasn't aware of this. I'll check it as soon as possible. However, I tried this on another machine running Windows 7 Professional 32 bit (at work) and it worked as expected. Might this be a phenomenon specific to W7 Ultimate, or perhaps the 64 bit version? – mingos Jul 3 '11 at 19:11
  • OK, confirmed. Thank you. I wouldn't have guessed it without your help. – mingos Jul 3 '11 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.