Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Virtual Hosts on Mac Tiger

Posted on 2006-06-24
3
Medium Priority
?
399 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
3 Comments
 
LVL 2

Accepted Solution

by:
alexsergeyev earned 1000 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
The viewer will learn how to dynamically set the form action using jQuery.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

971 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