Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9175791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:58:26+00:00 2026-06-17T16:58:26+00:00

I am using WAMP on windows 7 Have made alias of zf2-tutorial.localhost, have added

  • 0

I am using WAMP on windows 7

Have made alias of zf2-tutorial.localhost, have added it in drivers/etc/hosts
Have also enabled the virtual host setting in:

Include conf/extra/httpd-vhosts.conf

Have set my alias in this file according to this

<VirtualHost *:80>
    ServerName zf2-tutorial.localhost
    DocumentRoot /path/to/zf2-tutorial/public
    SetEnv APPLICATION_ENV "development"
    <Directory /path/to/zf2-tutorial/public>
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

When I open zf2-tutorial.localhost it shows the zend page as expected. But when I am trying to open localhost page it shows this:

Forbidden

You don't have permission to access / on this server.

Disabling Virtual Host in httpd.conf, allows to open localhost but fail to open zf2-tutorial.localhost

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:58:27+00:00Added an answer on June 17, 2026 at 4:58 pm

    Possible duplicate here.

    In order to be able to access localhost while enabling Virtual Hosts, the first entry in your httpd-vhosts.conf needs to be named localhost and link to your web root.

    <VirtualHost *:80>
         ServerName localhost
         DocumentRoot "path/to/your/www/folder"
    </VirtualHost>
    <VirtualHost *:80>
        ServerName zf2-tutorial.localhost
        DocumentRoot /path/to/zf2-tutorial/public
        SetEnv APPLICATION_ENV "development"
        <Directory /path/to/zf2-tutorial/public>
            DirectoryIndex index.php
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    </VirtualHost>
    

    See an example in step three of Setup Apache to serve multiple sites.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have WAMP v2.2 installed on my Windows 7 machine, with virtual hosts enabled.
I have installed PHP using wamp server in Windows and I have give the
I have installed wamp server 2.2 I'm using windows 7 When I am online
I am using wamp on windows 7. I have had no issues until I
previously i was using Wamp 1 and Windows XP, but now i have WAMP
I am using windows 7 and wamp server 2.2, I have installed the wamp
I am using Windows 7 with Wamp 2.2 server. I have setup 2 virtual
I have windows server 2003 as my Operating Systme. I am using WAMP for
I configured Symfony 1.4 on Windows. My Server is Wamp. I' m using tutorial
I have a development environment set up in Windows using WAMP. The production environment

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.