Link to home
Create AccountLog in
Avatar of Andrew Angell
Andrew AngellFlag for United States of America

asked on

Trouble with fresh install of Zend Server and Apache virtual hosts..??

I've just done a fresh install of Windows Server 2008 with Zend Server 6.1.0.  

Everything seems to be working fine, but I'm trying to setup virtual hosts and I'm having issues, so I must be forgetting a step somewhere.

I have the following pointing to my public IP address here:  http://paypal.angelleye.com

I can confirm that by pinging it, and because when I would browse that URL it would load my Zend Server admin login as expected.

I then opened up C:/Program Files(x86)/Zend/Apache2/conf/httpd.conf and uncommented the following line:

#Virtual hosts
Include conf/extra/httpd-vhosts.conf

I then opened C:/Program Files(x86)/Zend/Apache2/conf/extra/httpd-vhosts.conf and added the following:

<VirtualHost *:80>
    DocumentRoot "C:/Websites/angelleye-paypal-library"
    ServerName paypal.angelleye.com
    <directory "C:/Websites/angelleye-paypal-library">
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    </directory>
</VirtualHost>

Upon doing so, when I try to browse the site now I get a 403 Forbidden, which is what I remember getting in the past if I simply forgot to setup the vhost.  

I'm thinking I must have done something wrong with my vhost config but I've tried numerous samples (which all seem to be different) that I've seen online for what that should look like and I can't get any of them to work.

Any information on this would be greatly appreciated.  Thanks!

EDIT:  I've actually done something now that's caused me to get 403 Forbidden on everything, even http://localhost.  Not sure what I've done wrong here..??
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Andrew Angell

ASKER

Ok, well, that kinda worked but it's still something funny.

When I added the Allow from all line I can how browse http://paypal.angelleye.com and I get what I expect, which is the directory contents.

What's weird now, though, is that if I do http://localhost from the server itself or if I use any other domain I have pointed there (like http://vitalstocks.angelleye.com, for example) those are also showing the contents of the directory that I wanted setup just for the paypal site.

I had this all working perfectly before but the VM crashed on me so I can't remember or pull up how I had these before.  

I need http://localhost to pull up the basic default (Zend Server control panel), and then for each vhost I create I would specify the unique directory for that particular site.  Right now everything is hitting the one directory for some reason..??
Hmm, well, nevermind, I think I'm mostly there.  I now have...

<VirtualHost *:80>
    DocumentRoot "C:/Websites/angelleye-paypal-library"
    ServerName paypal.angelleye.com
    <directory "C:/Websites/angelleye-paypal-library">
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    Allow from all
    </directory>
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:/Websites/vital-stocks"
    ServerName vitalstocks.angelleye.com
    <directory "C:/Websites/vital-stocks">
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    Allow from all
    </directory>
</VirtualHost>

That is allowing http://paypal.angelleye.com and http://vitalstocks.angelleye.com to load separately from each other as expected, so that's good.  

I still can't get to my regular Zend controller admin, though, which runs on basic http://localhost.  It winds up loading the contents of /angelleye-paypal-library.  

Seems like somehow that has become the default instead of the Zend admin panel..??  If I comment out the vhosts line in httpd.conf, though, then the Zend admin panel loads again for everything.
I think you are bit confused about what localhost is, localhost will (always) go to the default site, if you want to pull up the Zend config then you need to set an alias for it.