Andrew Angell
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/co nf/httpd.c onf and uncommented the following line:
#Virtual hosts
Include conf/extra/httpd-vhosts.co nf
I then opened C:/Program Files(x86)/Zend/Apache2/co nf/extra/h ttpd-vhost s.conf and added the following:
<VirtualHost *:80>
DocumentRoot "C:/Websites/angelleye-pay pal-librar y"
ServerName paypal.angelleye.com
<directory "C:/Websites/angelleye-pay pal-librar y">
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..??
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/co
#Virtual hosts
Include conf/extra/httpd-vhosts.co
I then opened C:/Program Files(x86)/Zend/Apache2/co
<VirtualHost *:80>
DocumentRoot "C:/Websites/angelleye-pay
ServerName paypal.angelleye.com
<directory "C:/Websites/angelleye-pay
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
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Hmm, well, nevermind, I think I'm mostly there. I now have...
<VirtualHost *:80>
DocumentRoot "C:/Websites/angelleye-pay pal-librar y"
ServerName paypal.angelleye.com
<directory "C:/Websites/angelleye-pay pal-librar y">
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.
<VirtualHost *:80>
DocumentRoot "C:/Websites/angelleye-pay
ServerName paypal.angelleye.com
<directory "C:/Websites/angelleye-pay
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.
ASKER
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..??