Hi,
Using Apache... can the httpd.conf file be changed in any way so that say, a website stroed in C:\Website1\ can be open by running http://website1/
and a website stored in C:\somedir\website2\ can be opened by running http://website2/
or does everything on the local machine have to come from localhost?
I know how to create virtual directories with Alias, but I need (well, want actually) a virtual server
Chris
Virtual Servers on same machine
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
you need to make changes to your HOSTS file, and httpd.conf to do that. HOSTS file is located at: c:/windows/system32/drivers/etc/
copy the localhost line to whatever names you want..
for the changes to httpd.conf, I believe virtual host/aliasing settings will do it.
however, this will only work on your local machine. Your DNS server would need configuring to map them to a network.
copy the localhost line to whatever names you want..
for the changes to httpd.conf, I believe virtual host/aliasing settings will do it.
however, this will only work on your local machine. Your DNS server would need configuring to map them to a network.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
I can't make it work... I can add new host names that do the same as typing localhost but it's the virtual server settings in httpd.conf i can't figure (I want http://webs/ to point to C:\Projects\Webs\ as an example)
My HOSTS file
My HOSTS file
and what I'm adding to httpd.conf# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
127.0.0.1 webs
<VirtualHost *:80>
ServerAdmin nobody@nobdy.com
DocumentRoot C:/Projects/Webs/
ServerName webs
ErrorLog logs/dummy-host.example.com-error_log #Not important
CustomLog logs/dummy-host.example.com-access_log common #Not important
</VirtualHost>
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia