Solved

Virtual Hosts on Mac Tiger

Posted on 2006-06-24
3
382 Views
Last Modified: 2013-11-18
I am running Mac Tiger (10.4) with the default Apache server. I am trying to set up virtual hosts and have followed directions from a number of different sources but cannot get this to work. My goal is to use my local machine as a development machine for a few websites so I need about 4 virtual hosts. In the httpd:
NameVirtualHost 127.0.0.1
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot /Library/Webserver/Documents
ServerName localhost
</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot /Library/Webserver/Documents
ServerName localhost
</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot /localsite
ServerName localsite
</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot /
ServerName testsite
</VirtualHost>

1. All of the examples I read about use www.example.com as a path. I do not understand why. It seems like you could just use folder names.
2.  I am getting A 403 Forbidden error.
3. Can an expert help me with this. Please post specific instructions and apparently there is a difference between Panther setup and TIger setup. I am using NetInfoManager to add the dns. I am not sure what that means but one of the instructions said to do so.

0
Comment
Question by:MarleneAyers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Accepted Solution

by:
alexsergeyev earned 250 total points
ID: 16980668
You have two "localhost" blocks. That isn't right.

UseCanonicalName Off

All hostnames should be resolvable to IP address 127.0.0.1 (testsite and localsite)

Directive
    DocumentRoot /

is really dangerous, are you sure that you wanted to make Apache serving root filesystem directory?

If /Library/Webserver/ is your main directory to place sites under it, you might want to add/check block in config similar to:

<Directory "/Library/Webserver">
    Options Indexes FollowSymLinks MultiViews Includes
    # AllowOverride All # if you want to use .htaccess files or other value from manual
    Order allow,deny
    Allow from all
</Directory>

0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Create your own, high-performance VM backup appliance by installing NAKIVO Backup & Replication directly onto a Synology NAS!
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question