Last active
January 1, 2016 13:09
-
-
Save mostafiz57/8149479 to your computer and use it in GitHub Desktop.
*Virtual host*.You need to create an Apache virtual host for the application and edit your hosts file.Setting up the virtual host is usually done within httpd.conf or extra/httpd-vhosts.conf.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.Set 1: At first create virtual host for common url | |
<VirtualHost *:80> | |
DocumentRoot "E:/wamp/www" | |
ServerName localhost | |
ServerAlias localhost | |
</VirtualHost> | |
Here localhost will work for acess Apache | |
2.Vitual Host for Zend framework2 | |
<VirtualHost *:80> | |
ServerName zf2.localhost | |
DocumentRoot C:\wamp\www\cq-consumer-standalone\src\public//Your application | |
SetEnv APPLICATION_ENV "development" | |
<Directory C:\wamp\www\cq-consumer-standalone\src\public>//Your application | |
DirectoryIndex index.php | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
</Directory> | |
</VirtualHost> | |
3. Vitual Host for Zend framework1 | |
<VirtualHost *:80> | |
ServerName wd2.localhost | |
DocumentRoot E:\wamp\www\weddinspire-source //Your application | |
RewriteEngine off | |
<Location /> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} -s [OR] | |
RewriteCond %{REQUEST_FILENAME} -l [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^.*$ - [NC,L] | |
RewriteRule ^.*$ /index.php [NC,L] | |
</Location> | |
</VirtualHost> | |
Make sure that you update your /etc/hosts or c:\windows\system32\drivers\etc\hosts file so that zf2-tutorial.localhost is mapped to 127.0.0.1 | |
127.0.0.1 localhost | |
127.0.0.1 zf2.localhost localhost | |
127.0.0.1 wd2.localhost | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment