Thursday, July 25, 2013

localhost redirecting to path specified for sub domain

In cakephp, I want to redirect localhost to app2 and client1.localhost to app1.
Instead both are redirecting to app1.

my httpd-vhosts is defined as:
 NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1> 
    DocumentRoot "D:\wamp\www\cakephp\app2\webroot\
    ServerName localhost
</VirtualHost>

<VirtualHost www.myhost> 
    DocumentRoot "D:\wamp\app1\webroot"
    ServerName client1.localhost
    ServerAlias client1.localhost
    <Directory "D:\wamp\app1\webroot">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
   </Directory>
</VirtualHost>

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: