NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHundamentals: virtual host addendum?

Jeff Siegel jsiegel1 at optonline.net
Wed Jan 14 11:56:39 EST 2004


If someone wants to "take the lead" on reviewing the technical details 
(I have zero experience with the Mac setup), we could then add an 
"addendum."

Jeff Siegel
1/2 of the PHundamentals Team ;)

Stephen Musgrave wrote:

> yes, this is a great idea.  thanks to all who contribute to these articles.
> in the rush to get the know the language, these finer details are all too
> often glazed over.
> 
> [guilty.]
> 
> i develop on MAC OS X and thought i would offer some additional pointers on
> the VIRTUAL HOSTING topic that may be added to the topic by whomever
> maintains it.
> 
> http://phundamentals.nyphp.org/PH_virtualhosting.php?expiredate=10/10/2003
> 
> i would appreciate a peer review on this since i am not totally confident
> that my installation is typical (especially with regard to the location of
> the Sites directory).  there might also be some tips to improve the language
> so as to be more helpful.
> 
> to set up a virtual host on MAC OS X
> 
> 1.  Setting up the directories for the virtual host
> 
> 1a.  Create a directory within your 'Sites' directory that will hold all the
> files for your project.  I typically append .dev to the domain name.  So if
> I were working on a project for project.com, i would name the directory
> 'project.dev'.
> 
> 1b.  Within the project.dev directory, create your document root directory
> (htdocs, www or public_html).
> 
> 2.  Setting up a machine alias in Net Info Manager
> 
> 2a.  Open Net Info Manager (located in Applications/Utilities).
> 
> 2b.  In the middle column, select the 'machines' directory (/machines) and
> then select 'localhost'.  Click on the 'duplicate' icon on the task bar.
> (Be sure that the you have unlocked the application before trying to
> duplicate or else the icon will be dim and you won't be able to duplicate.)
> 
> 2c.  Select the 'localhost copy' machine.  The details (ip_address, name,
> servers) will show up in the panel below the list.  double click on the
> value for name (localhost copy).  Rename it to 'project.dev' or whatever you
> would like.  This is the string you will enter for the URL in your browser
> to reach the virtual host.  Close Net Info Manager
> 
> 3.  Edit the Apache httpd.conf file (/etc/httpd/httpd.conf).
> 
> 3a.  Using vi (or other editor), edit the httpd.conf file.  It is likely you
> will have to use the sudo command:  sudo vi httpd.conf  (Make a backup
> first! -- sudo cp httpd.conf httpd.conf.bak)
> 
> 3b.  Scroll until you see:
> <VirtualHost 127.0.0.1>
>  DocumentRoot /Users/username/Sites
>  ServerName localhost
> </VirtualHost>
> 
> 3c.  Copy and paste this virtual host definition for localhost.  Change the
> values to look like so:
> <VirtualHost 127.0.0.1>
>  DocumentRoot /Users/username/Sites/project.dev/htdocs
>  ServerName project.dev
>  ErrorLog /Users/stephenm/Sites/project.dev/error_log
> </VirtualHost>
> 
> 4d.  Save the file.
> 
> 5.  Restart Apache
> 
> 5a.  Open 'System Preferences'.
> 5b.  Click on 'Sharing'.
> 5c.  Under the 'Services' tab, click 'Personal Web Sharing'.
> 5d.  Click on the 'Stop' button.  When it shows as 'Start', click it again.
> When it shows as 'Stop' you know that the server has restarted normally and
> there weren't any compilation errors entered in the httpd.conf file.
> 5e.  Alternately, you can use the command 'apachectl graceful'.
> 
> 6.  Testing
> 
> 6a.  Create an 'index.html' file the document root fold of the virtual host
> (Sites/project.dev/htdocs)
> 6b.  Enter 'http://project.dev' into the location of your browser.
> 6c.  You should see file you just created.
> 
> 
> 
> 
> STEPHEN.
> 
> ] stephen at musgrave.org
> ] http://stephen.musgrave.org/
> 
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
> 

-- 
Found on the Simpson's Website:
"Ooooooh, they have the internet on computers now!"


>From hans not junk at nyphp.com  Wed Jan 14 12:03:58 2004
Return-Path: <hans not junk at nyphp.com>
Received: from ehost011-1.exch011.intermedia.net (unknown [64.78.21.3])
	by virtu.nyphp.org (Postfix) with ESMTP id 5FF13A85A6
	for <talk at lists.nyphp.org>; Wed, 14 Jan 2004 12:03:58 -0500 (EST)
X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Subject: RE: [nycphp-talk] Quoting and netiquette
Date: Wed, 14 Jan 2004 09:03:56 -0800
Message-ID: <41EE526EC2D3C74286415780D3BA9F87374BF9 at ehost011-1.exch011.intermedia.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [nycphp-talk] Quoting and netiquette
Thread-Index: AcPau+8bj3hmHFPTQaO4oBPPl4lA1gABFuUg
From: "Hans Zaunere" <hans not junk at nyphp.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
X-BeenThere: talk at lists.nyphp.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: NYPHP Talk <talk at lists.nyphp.org>
List-Id: NYPHP Talk  <talk.lists.nyphp.org>
List-Unsubscribe: <http://lists.nyphp.org/mailman/listinfo/talk>,
	<mailto:talk-request at lists.nyphp.org?subject=unsubscribe>
List-Archive: <http://lists.nyphp.org/pipermail/talk>
List-Post: <mailto:talk at lists.nyphp.org>
List-Help: <mailto:talk-request at lists.nyphp.org?subject=help>
List-Subscribe: <http://lists.nyphp.org/mailman/listinfo/talk>,
	<mailto:talk-request at lists.nyphp.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Jan 2004 17:03:58 -0000


> > We've been needing to get some posting guidelines and=20
> > do's/don't's for the NYPHP lists.  If anyone has any written up,
> > I'll be happy to add
> > them to nyphp.org
>=20
> This is the best list that I know of:
>=20
> http://webdesign-l.com/policies/
>=20
> I may be able to get permission to "share" them (or that parts that
> apply to us) with NYPHP if we decide we like them.

Now that's good policy!  If you could Adam that'd be great...let me
know.  We can compile the pertinent information into our own policy and
I see no reason to credit them as a source, and anyone else who
contributes.

H




More information about the talk mailing list