0

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 ?

0

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.