0
votes

I'm new to Zend Framework 2, and I started with installing a ZF2 Skeleton as shown in this page : https://github.com/zendframework/ZendSkeletonApplication

I'm using EasyPHP, and I want to setup a virtual host to point to the public/ directory of the ZF2 project, so in the httpd-vhosts.conf I added the following configuration :

<VirtualHost *:80>
    ServerName zf2-app.localhost
    DocumentRoot "C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\skeleton-application\public"
    <Directory "C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\skeleton-application\public">
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
        <IfModule mod_authz_core.c>
        Require all granted
        </IfModule>
    </Directory>
</VirtualHost>

After I restarted EasyPHP and entered http://zf2-app.localhost/ I get the localhost for EasyPHP, so in order to access the ZF2 application I have to access this address : http://zf2-app.localhost/skeleton-application/public/

How can I solve this problem ?

1

1 Answers

1
votes

Add this line to your hosts file located in:

Windows: C:\Windows\system32\drivers\etc

Linux/Mac: /etc/hosts

127.0.0.1    zf2-app.localhost

You can also use any TLD as .dev or .web