adding a new vhost
Posted by: eddywebs (---.static.stls.mo.charter.com)
Date: December 29, 2010 09:15PM

Hi , I had been trying add a new vhost to wamp
edited the httpd-vhosts.conf to include Virtual hosts

and added the new vhost at httpd-vhosts.conf , but cant make it run , using apache 2.2.11

here is how the httpd-vhosts.conf looks like

-----------------------

#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:[httpd.apache.org];
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.


<Directory C:/wamp/www/>
Order Deny,Allow
Allow from all
</Directory>

<Directory C:/wamp/www/advisorcheck>
Order Deny,Allow
Allow from all
</Directory>
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#

<VirtualHost *:80>
DocumentRoot "C:/wamp/www/advisorcheck"
ServerName advisorcheck
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.localhost
DocumentRoot "C:/wamp/www"
ServerName localhost

</VirtualHost>

----------------------------------------------

Options: ReplyQuote
Re: adding a new vhost
Posted by: yfastud (Moderator)
Date: December 30, 2010 06:33AM

In order to access from other PC's no matter within or outside your LAN, you need to setup Access, DNS, and VH; Access for permission to connect to your WAMP PC, DNS to tie Domain(s) to your WAMP PC, and VH to host multiple Domains/Websites/IP's and even you have only 1 Domain/Website/IP, you should use VH to set it up w/ the site you want to show up first on top and localhost on bottom and others in middle if having more than 1 site; if dont have real Domain, just skip DNS guide

To setup Access, follow this
[blog.jlbn.net]

To setup VH, follow this
[blog.jlbn.net]

To setup DNS, follow this
[blog.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: adding a new vhost
Posted by: tomkraw1 (---.icpnet.pl)
Date: January 02, 2011 09:19AM

I use WampServer for development only but I also use vhosts. I add rows like this

127.0.0.1 datastan.local

to the file %windie%\system32]drivers\etc\hosts (which does the dns job)

and this to http.conf in WampServer:

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


<VirtualHost 127.0.0.1>
ServerName datastan.local
DocumentRoot "d:\wamp\www\datastan.local"
</VirtualHost>

Now it is necesairy to restart apache and type in ny favorite web browser an address [datastan.local] For another vhosts I only add VirtualHost sections at the end of httpd.conf. It workis fine for me.

regards
tk1
[dev.freshsite.pl]

Options: ReplyQuote


Sorry, only registered users may post in this forum.