7 Replies - 6544 Views - Last Post: 05 November 2011 - 09:09 AM

#1 dreamincodehamza  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: -12
  • View blog
  • Posts: 330
  • Joined: 12-September 08

zend framework virtual host not working

Posted 01 November 2011 - 07:04 PM

the problem is that when i define the second one virtual host the first oen stop working.
need help

My virtual host code

 <Directory "C:/AppServ/www/server/zendy/public">
  DirectoryIndex index.php
  AllowOverride All
  Order allow,deny
  Allow from all
 </Directory>
</VirtualHost>


<VirtualHost digitalus:80>
    ServerName digitalus
    DocumentRoot C:/AppServ/www/server/digitalus/public
 
     <Directory "C:/AppServ/www/server/digitalus/public">
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>



Is This A Good Question/Topic? 0
  • +

Replies To: zend framework virtual host not working

#2 codeprada  Icon User is offline

  • Changed Man With Different Priorities
  • member icon

Reputation: 944
  • View blog
  • Posts: 2,353
  • Joined: 15-February 11

Re: zend framework virtual host not working

Posted 01 November 2011 - 07:32 PM

Is that the entire vhost file? If so then you're Apache would fail to start. Have a look at this link: VirtualHost Examples.
Was This Post Helpful? 0
  • +
  • -

#3 dreamincodehamza  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: -12
  • View blog
  • Posts: 330
  • Joined: 12-September 08

Re: zend framework virtual host not working

Posted 02 November 2011 - 01:41 PM

View Postcodeprada, on 01 November 2011 - 07:32 PM, said:

Is that the entire vhost file? If so then you're Apache would fail to start. Have a look at this link: VirtualHost Examples.


previous code is located in apachi config file http.conf
this is my hosts file code
127.0.0.1 zandy
127.0.0.1 digitalus
Was This Post Helpful? 0
  • +
  • -

#4 codeprada  Icon User is offline

  • Changed Man With Different Priorities
  • member icon

Reputation: 944
  • View blog
  • Posts: 2,353
  • Joined: 15-February 11

Re: zend framework virtual host not working

Posted 02 November 2011 - 03:09 PM

Try this
NameVirtualHost *

<VirtualHost 127.0.0.1:80>
    ServerName digitalus
    DocumentRoot C:/AppServ/www/server/digitalus/public
 
     <Directory "C:/AppServ/www/server/digitalus/public">
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>



I've ignored the first Virutal Host since it's not complete. If that's exactly what's in your httpd-vhosts.conf file then Apache won't work.
Was This Post Helpful? 1
  • +
  • -

#5 aaron1178  Icon User is offline

  • Dovakiin, Dragonborn
  • member icon

Reputation: 169
  • View blog
  • Posts: 1,297
  • Joined: 22-October 08

Re: zend framework virtual host not working

Posted 02 November 2011 - 05:26 PM

I am not being critical but how is this apart of zend framework. Even though Php's core is Zend.
Was This Post Helpful? 0
  • +
  • -

#6 codeprada  Icon User is offline

  • Changed Man With Different Priorities
  • member icon

Reputation: 944
  • View blog
  • Posts: 2,353
  • Joined: 15-February 11

Re: zend framework virtual host not working

Posted 02 November 2011 - 06:48 PM

View Postaaron1178, on 02 November 2011 - 08:26 PM, said:

I am not being critical but how is this apart of zend framework. Even though Php's core is Zend.

Zend Framework must run on a virtual host or a domain of it's own. The way it's designed is that it will not work properly with URLs like
http://localhost/zendproject/public/index.php
. It needs something like
http://zendproject.local/index.php
and that's where Apache's Virtual Host comes in.

This post has been edited by codeprada: 02 November 2011 - 06:48 PM

Was This Post Helpful? 1
  • +
  • -

#7 dreamincodehamza  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: -12
  • View blog
  • Posts: 330
  • Joined: 12-September 08

Re: zend framework virtual host not working

Posted 05 November 2011 - 09:07 AM

View Postcodeprada, on 02 November 2011 - 06:48 PM, said:

View Postaaron1178, on 02 November 2011 - 08:26 PM, said:

I am not being critical but how is this apart of zend framework. Even though Php's core is Zend.

Zend Framework must run on a virtual host or a domain of it's own. The way it's designed is that it will not work properly with URLs like
http://localhost/zendproject/public/index.php
. It needs something like
http://zendproject.local/index.php
and that's where Apache's Virtual Host comes in.


@codeprada thank you so much
Was This Post Helpful? 0
  • +
  • -

#8 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6031
  • View blog
  • Posts: 23,413
  • Joined: 23-August 08

Re: zend framework virtual host not working

Posted 05 November 2011 - 09:09 AM

Not a PHP question. Moved to Web Servers & Hosting
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1