Hello
I need to setup a virtual host for my zend aplication
I managed to link all my zend framework with php and windows I am using wamp 2.2d and I am having a problem with the virtual host

NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
    ServerAdmin webmaster@localhost
    DocumentRoot "c:/wamp/www"
    ServerName localhost
    ServerAlias localhost
    ErrorLog "C:/wamp/logs/apache_error.log"
    CustomLog "C:/wamp/logs/access.log" common
</VirtualHost>


<VirtualHost 127.0.0.1:80>
    ServerAdmin admin@zendy.localhost
    DocumentRoot "C:/workspace/zendy/public"
    ServerName zendy
    ServerAlias zendy
    ErrorLog "C:/workspace/zendy/public/logs/apache_error.log"
    CustomLog "C:/workspace/zendy/public/logs/access.log" common
    allow from all
</VirtualHost>

And I have already enabled
rewrite And vhost in httpd.conf and modified my etc drivers host file accordanaly

If someone knows how to make this work only with httpd.conf I would be greatful
None of my methods or ideas worked

Thank you

When I create a new site or app, I edit two files. my host file for windows, and my http.conf file for wamp.
The first block is to point wamp to a new folder I created on my C: drive 'www' inside that folder i create subfolders for each site I am working on.

Example: C:/www/site1
Example: C:/www/site2

Then I edit http.conf with the two blocks below teh hash lines and name them site1 and site2

This is how I set up my development server all this is at the bottom of my wamp http.conf file:

NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot "C:/wamp/www" 

<Directory "c:/wamp/www">
allow from all
order allow,deny
# Enables .htaccess files for this site
AllowOverride All
 </Directory>
</VirtualHost>

################SITE 1##########################
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
ServerName site1.dev
DocumentRoot "C:/www/site1/" 

<Directory "c:/www/site1">
allow from all
order allow,deny
# Enables .htaccess files for this site
AllowOverride All
 </Directory>
</VirtualHost>
##########################################
################SITE 2##########################
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
ServerName site2.dev
DocumentRoot "C:/www/site2/" 

<Directory "c:/www/site2">
allow from all
order allow,deny
# Enables .htaccess files for this site
AllowOverride All
 </Directory>
</VirtualHost>
##########################################

Thank you for your help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.