I would like to have 2 domain like;
- http:// www .irs .net
- http:// www. krtu. net
i edit httpd-vhosts.conf as paste below;
- Code: Select all
#
# 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:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# 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>
ServerAdmin admin@irs.net
DocumentRoot "C:/xampp/htdocs/irs"
ServerName irs.net
ServerAlias www.irs.net
ErrorLog "logs/irs-error.log"
CustomLog "logs/irs-access.log" combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin admin@krtu.net
DocumentRoot "C:/xampp/htdocs/krtu"
ServerName krtu.net
ServerAlias www.krtu.net
ErrorLog "logs/irs-error.log"
CustomLog "logs/irs-access.log" combined
</VirtualHost>
##<VirtualHost *:80>
##ServerAdmin postmaster@dummy-host2.localhost
##DocumentRoot "C:/xampp/htdocs/dummy-host2.localhost"
##ServerName dummy-host2.localhost
##ServerAlias www.dummy-host2.localhost
##ErrorLog "logs/dummy-host2.localhost-error.log"
##CustomLog "logs/dummy-host2.localhost-access.log" combined
##</VirtualHost>
when browse from client pc with url http:// www .krtu .net on krtu. net its result with 'server not found' but if type krtu its work and i can browse the url.
FYI KRTU is my Full Computer Name on network identification. on my network i use fixed IP as;
server - 192.168.0.1
router (internet access) - 192.168.0.234
pc1 - 192.168.0.21 (can access internet & xampp server)
pc2 - 192.168.0.22 (xampp server)
pc3 - 192.168.0.23 (xampp server)
pc4 - 192.168.0.24 (xampp server)
How to make that 4 pc can browse to my local server with url that i fixed on httpd-vhosts.conf any other configuration should i edit to make it work.
Regards