<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>OS X hosting, Xserves, Mac Minis, G4's, G5s</title>
	<atom:link href="http://osxhosting.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://osxhosting.wordpress.com</link>
	<description>Here for all your hosting and support.</description>
	<lastBuildDate>Tue, 11 Mar 2008 20:29:27 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='osxhosting.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/f7549305a56795da1e92226a75a1d574?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>OS X hosting, Xserves, Mac Minis, G4's, G5s</title>
		<link>http://osxhosting.wordpress.com</link>
	</image>
			<item>
		<title>XSAN MultiSAN</title>
		<link>http://osxhosting.wordpress.com/2008/03/11/xsan-multisan/</link>
		<comments>http://osxhosting.wordpress.com/2008/03/11/xsan-multisan/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 20:27:11 +0000</pubDate>
		<dc:creator>montanaflynn</dc:creator>
				<category><![CDATA[Leopard]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Xserve]]></category>
		<category><![CDATA[collaboration]]></category>
		<category><![CDATA[multiSAN]]></category>
		<category><![CDATA[volumes]]></category>
		<category><![CDATA[XSAN]]></category>

		<guid isPermaLink="false">http://osxhosting.wordpress.com/2008/03/11/xsan-multisan/</guid>
		<description><![CDATA[

Now a single workstation or server can access Xsan volumes simultaneously. MultiSAN is ideal for users who need to access multiple Xsan volumes from the same workstation or server, such as newsrooms with separate SAN volumes for production and broadcast.
MultiSAN allows a single workstation or server to access Xsan volumes hosted by separate Xsan metadata [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=35&subd=osxhosting&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div class="column first">
<h2><img src="http://images.apple.com/xsan/features/images/multisan_title20080219.gif" alt="One for all. All for one." height="18" width="223" /></h2>
<p>Now a single workstation or server can access Xsan volumes simultaneously. MultiSAN is ideal for users who need to access multiple Xsan volumes from the same workstation or server, such as newsrooms with separate SAN volumes for production and broadcast.</p>
<p><img src="http://images.apple.com/xsan/features/images/multisan_drives20080219.jpg" alt="Drives" class="left icon" height="111" width="102" />MultiSAN allows a single workstation or server to access Xsan volumes hosted by separate Xsan metadata controllers. Hosting volumes on separate Xsan controllers can improve the performance, reliability, and sustainability of critical volumes. Each volume is independently hosted, so a failure of any one volume does not affect another.</p>
<div class="column last"> 						<img src="http://images.apple.com/xsan/features/images/multisan_productionsan20080219.jpg" alt="Production" class="across center" height="216" width="313" />Users can copy data between Xsan volumes directly over Fibre Channel. Prior to Xsan 2 and MultiSAN, data had to be moved over a slower Ethernet connection to copy data from one independent Xsan volume to another. With Fibre Channel, production workflows are significantly more efficient, and greater collaboration can be achieved.</p>
<p><img src="http://images.apple.com/xsan/features/images/multisan_diagram20080208.jpg" alt="MultiSAN Diagram" class="diagram" border="0" height="294" width="459" /></div>
</div>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/osxhosting.wordpress.com/35/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/osxhosting.wordpress.com/35/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/osxhosting.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/osxhosting.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/osxhosting.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/osxhosting.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/osxhosting.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/osxhosting.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/osxhosting.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/osxhosting.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/osxhosting.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/osxhosting.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=35&subd=osxhosting&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://osxhosting.wordpress.com/2008/03/11/xsan-multisan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bb0ea156c7154f63c261bc6b83587dc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">montanaflynn</media:title>
		</media:content>

		<media:content url="http://images.apple.com/xsan/features/images/multisan_title20080219.gif" medium="image">
			<media:title type="html">One for all. All for one.</media:title>
		</media:content>

		<media:content url="http://images.apple.com/xsan/features/images/multisan_drives20080219.jpg" medium="image">
			<media:title type="html">Drives</media:title>
		</media:content>

		<media:content url="http://images.apple.com/xsan/features/images/multisan_productionsan20080219.jpg" medium="image">
			<media:title type="html">Production</media:title>
		</media:content>

		<media:content url="http://images.apple.com/xsan/features/images/multisan_diagram20080208.jpg" medium="image">
			<media:title type="html">MultiSAN Diagram</media:title>
		</media:content>
	</item>
		<item>
		<title>mod_ssl on a mac</title>
		<link>http://osxhosting.wordpress.com/2008/03/03/mod_ssl-on-a-mac/</link>
		<comments>http://osxhosting.wordpress.com/2008/03/03/mod_ssl-on-a-mac/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 18:51:35 +0000</pubDate>
		<dc:creator>montanaflynn</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mod_ssl]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[ssl.key]]></category>

		<guid isPermaLink="false">http://osxhosting.wordpress.com/2008/03/03/mod_ssl-on-a-mac/</guid>
		<description><![CDATA[
Web development requires the hardware and software to accommodate a wide variety of client needs and web technologies. Apple has provided web developers with an enormously flexible development environment in Mac OS X. By including Apache, the world’s most widely used web server, along with a host of related technologies (PHP, OpenSSL, SSI, etc) Apple [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=34&subd=osxhosting&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h1><img src="http://developer.apple.com/internet/images/title_modssl.gif" alt="Using mod_ssl on Mac OS X" height="33" width="680" /></h1>
<p>Web development requires the hardware and software to accommodate a wide variety of client needs and web technologies. Apple has provided web developers with an enormously flexible development environment in Mac OS X. By including Apache, the world’s most widely used web server, along with a host of related technologies (PHP, OpenSSL, SSI, etc) Apple has provided a perfect compliment to popular tools such as BBEdit, Adobe Photoshop, and Macromedia Dreamweaver.</p>
<p>This tutorial will show you how to enable one of the most important technologies included with the standard installation of Apache on Mac OS X, <a href="http://www.modssl.org/">mod_ssl</a>. The mod_ssl module lets Apache use OpenSSL, thereby enabling cryptographically protected connections to web servers via the <a href="http://www.netscape.com/eng/ssl3/">Secure Sockets Layer (SSL)</a> and <a href="http://www.ietf.org/rfc/rfc2246.txt">Transport Layer Security</a>. Though this is not a comprehensive tutorial on system security, if you enable mod_ssl you will add a layer of security to a Mac OS X machine’s Web Sharing feature.</p>
<p>For more on security in Mac OS X, see <a href="http://developer.apple.com/internet/security/securityintro.html">An Introduction to Mac OS X Security</a>.</p>
<h2>Why SSL?</h2>
<p>Adding Apache support for mod_ssl is a great development step. You will be able to test scripts and applications in the most realistic environment possible prior to deployment to a staging or production server. This will help cut development time. It also permits access to your computer that is encrypted. Web applications served off of your Macintosh will be accessible in a secure way. So passwords passed to your machine via web-based forms will be hidden from packet sniffers. Data transmitted to a browser will also be encrypted during transit.<span id="more-34"></span></p>
<h2>Definition of SSL</h2>
<p>The <a href="http://www.netscape.com/eng/ssl3/draft302.txt">Draft Specification for the SSL Protocol</a> contains a good definition of SSL.</p>
<p><cite>&#8230; Secure Sockets Layer(SSL V3.0) protocol [is] a security protocol that provides communications privacy over the Internet. The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery.</cite></p>
<p>In other words, SSL enables client/server communications that are encrypted, providing security and privacy in communications. Additionally, with SSL, every server has a &#8220;fingerprint&#8221;, a means of identifying a specific server as being the source of any information returned through an SSL request.</p>
<p>SSL uses Public Key Cryptography, which uses Key Pairs — one private key, kept on the server, and one public key, distributed to clients requesting it. Data encrypted or “locked” with one key can only be decrypted, or “unlocked” with the matching key in the key pair.</p>
<h2>What’s There and What’s Needed</h2>
<p>To establish secure communications over the web via SSL you need the Apache server compiled with the Enhanced Apache API (EAPI), OpenSSL, and the mod_ssl module. Thankfully, Apple has provided all of the needed ingredients in Mac OS X. Moreover, you can find documentation for these products on a standard Mac OS X installation:</p>
<ul class="inline">
<li>The Apache Manual (<a href="http://localhost/manual">http://localhost/manual</a>)</li>
<li>mod_ssl User Manual (<a href="//localhost/Library/Documentation/Services/apache_mod_ssl/index.html">file://localhost/Library/Documentation/Services/apache_mod_ssl/index.html</a>)</li>
<li>OpenSSL “man” pages (type <code>man openssl</code> in the terminal).</li>
</ul>
<p>The one item you need to add is the sign.sh script that is distributed with the mod_ssl distribution. You can find more information on this on the <a href="http://www.modssl.org/docs/2.3/ssl_faq.html#cert-ownca">FAQ</a>.</p>
<p>If you know how to start the Terminal, run <code>sudo</code>, and edit the <code>httpd.conf</code> file that configures Apache, you’ll be in good shape. I like using emacs for editing text files, and have included the commands needed for working with emacs. Feel free to use pico, TextEdit, BBEdit, or whatever you know how to use.</p>
<p>The <code>sudo</code> command lets you temporarily become a “superuser”. Using it requires that you know the password of a member of the admin group. You can see the members of the admin group by checking NetInfo Manager (under /groups/admin).</p>
<p>Finally, as cryptography is an acronym-rich subject, it might be helpful to keep a good <a href="http://www.visi.com/crypto/inet-crypto/glossary.html">glossary of terms</a> used in cryptography close at hand. In this article, you’ll come across the following acronyms:</p>
<ul class="inline">
<li>RSA: A commonly used Public Key encryption system developed by Rivest, Shamir, and Adelman.</li>
<li>DES: Data Encryption Standard. A cipher commonly used in commerce. Triple DES (3DES) describes the process of encrypting data three times with two or three DES keys.</li>
<li>PEM: Privacy Enhanced Mail. An e-mail cryptography protocol from the <a href="http://www.ietf.org/rfc/rfc1421.txt?number=1421">IETF</a>.</li>
</ul>
<h2>Configuring SSL</h2>
<p>The first thing you need to do is generate the keys and certifications for the server. This requires using the Terminal. For sanity’s sake, create a directory (Folder) on the desktop called KeyGen and change into that directory.</p>
<p><!--we don't need to generate the random data any more --></p>
<pre>cd ~/Desktop/KeyGen</pre>
<p>You can now create an RSA private key and a CSR (Certificate Signing Request) for your server. An important part of private key cryptography is making sure that the parties involved in a transaction are who they say they are. This is accomplished through a third party — a trusted Certificate Authority (CA). The CA issues certificates that identify the parties, and confirms that the keys are correct and are cryptographically “signed.” Generating the CSR is the cryptographical equivalent to filling out a passport application. The CA will return the certificate (like a passport) which is used for identification and authentication.</p>
<p>You’re going to be self-signing the keys, so you’ll also be creating a CA key for the signature. The keys and certificates you create are purely for testing purposes. If you need to set up a production server, you should send your CSR to a proper CA, such as <a href="http://www.verisign.com/">Verisign</a>, for signing.</p>
<p>To create the RSA private key, issue the following command:</p>
<pre>openssl genrsa -des3 -out server.key 1024</pre>
<p>You will be asked for a passphrase in the creation of this key. <i>Do not forget this passphrase!</i> You’ll have to do this all over if you forget the passphrase.  You will need this passphrase later on in the process.</p>
<p>You have just created the “SSLCertificateKeyFile”, as it is called in the httpd.conf — a 1024 bit RSA key encrypted with Triple-DES in PEM format. You’ll be plugging this into the configuration file for Apache soon.</p>
<p>Now you’re ready to create a CSR (Certificate Signing Request), which is what you would normally send to a CA for signing. You’re going to sign it yourself.</p>
<pre>openssl req -new -key server.key -out server.csr</pre>
<p>You’ll be asked for some information when you start this. Most of it is pretty self explanatory, but one item, in particular, is not. Here’s what you’ll be asked for:</p>
<pre>Country Name (2 letter code) [AU]: (enter your country code here)
State or Province Name (full name) [Some-State]: (Enter your state here)
Locality Name (eg, city) []: (enter your city here)
Organization Name (eg, company) [Internet Widgits Pty Ltd]: (enter something here)
Organizational Unit Name (eg, section) []: (enter something here)
Common Name (eg, YOUR name) []: (this is the important one)
Email Address []: (your e-mail address)</pre>
<p>The entry for “Common Name” is the one that seems like it should be one thing, but is, in fact, another. For this entry, you want to enter your “Server Name” as it appears in your httpd.conf (which you’ll be modifying soon). As this is just a development environment, you can enter 127.0.0.1, which is the default IP for “localhost”. Now, keep in mind that using 127.0.0.1 is <i>not</i> the same as using “localhost”. The strings either match, or they don’t — Unix is like that.</p>
<p>Looking at your KeyGen directory, you should have this:</p>
<pre>[localhost:~/Desktop/KeyGen] bob% ls -la
total 12
drwxr-xr-x    5 bob      staff         126 Sep 14 17:01 .
drwx------   38 bob      staff        1248 Sep 14 16:57 ..
-rw-r--r--    1 bob      staff         729 Sep 14 17:01 server.csr
-rw-r--r--    1 bob      staff         963 Sep 14 16:59 server.key</pre>
<p>Now you need to create a CA for signing the key. The process is similar to what you’ve just done, but there are some differences.</p>
<p>The first thing you need to do is create a key for your CA. It’s just like your server.key &#8211; a Triple-DES encrypted, 1024 bit RSA key.</p>
<pre>openssl genrsa -des3 -out ca.key 1024</pre>
<p>Again, you’ll be asked for a passphrase, which, again, you should not forget.</p>
<p>Now you will create a self-signed CA Certificate using the RSA key you just made.</p>
<pre>openssl req -new -x509 -days 365 -key ca.key -out ca.crt</pre>
<p>You’ll be asked for the passphrase for the key you just made, and, again, you’ll be asked to enter information about yourself. The main difference is that here, when you are asked for your “Common Name”, you want to enter your name — not the server name or IP address. This certificate is not associated with your server — it’s associated with you. It should look something like this:</p>
<pre>Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:Texas
Locality Name (eg, city) []:San Antonio
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Bogus CA
Organizational Unit Name (eg, section) []:Bogus CA for Dev
Common Name (eg, YOUR name) []:Bob Davis
Email Address []:bobdavis@mac.com</pre>
<p>Now you have 4 files in your directory — a CA key and certificate, and a server key and certificate signing request.</p>
<p>The next step is the important one. This is where you sign the server.key with your ca.crt. This will provide the security assurance that browsers need to establish a secure connection. It provides the identification and verification part of the public key encryption system where the keys themselves provide the mechanism for the encryption and decryption.</p>
<p>The easiest way to do this is to use the sign.sh script contained in the mod_ssl source you downloaded (it’s in the <code>pkg.contrib</code> sub-directory) or wherever you put.</p>
<p>Copy the script to your working directory, make it executable, and then run it by issuing  the following commands:</p>
<pre>chmod +x sign.sh
./sign.sh server.csr</pre>
<p>You should get something like this, but with the information you entered for the server.csr:</p>
<pre>CA signing: server.csr -&gt; server.crt:
Using configuration from ca.config
Enter PEM pass phrase:
Check that the request matches the signature
Signature ok
The Subjects Distinguished Name is as follows
countryName           <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:'US'
stateOrProvinceName   <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:'Texas'
localityName          <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:'San Antonio'
organizationName      <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:'Testing'
organizationalUnitName:PRINTABLE:'Testing'
commonName            <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> RINTABLE:'127.0.0.1'
emailAddress          :IA5STRING:'bobdavis@mac.com'
Certificate is to be certified until Sep 14 23:09:20 2002 GMT (365 days)
Sign the certificate? [y/n]:y

1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
CA verifying: server.crt &lt;-&gt; CA cert
server.crt: OK</pre>
<p>For the questions “Sign the certificate?” and “1 out of 1 certificate requests certified, commit?”, you just need to type “y” (without quotes) and hit enter/return.</p>
<p>Looking at your working directory now, you’ll see that you have a number of new files and directories in KeyGen.</p>
<pre>[localhost:~/Desktop/KeyGen] bob% ls -la
total 36
drwxr-xr-x   12 bob      staff         364 Sep 14 18:16 .
drwx------   38 bob      staff        1248 Sep 14 18:12 ..
-rw-r--r--    1 bob      staff        1298 Sep 14 17:55 ca.crt
drwxr-xr-x    3 bob      staff          58 Sep 14 18:09 ca.db.certs
-rw-r--r--    1 bob      staff         111 Sep 14 18:09 ca.db.index
-rw-r--r--    1 bob      staff           3 Sep 14 18:09 ca.db.serial
-rw-r--r--    1 bob      staff         963 Sep 14 17:52 ca.key
-rw-r--r--    1 bob      staff        2679 Sep 14 18:09 server.crt
-rw-r--r--    1 bob      staff         729 Sep 14 17:01 server.csr
-rw-r--r--    1 bob      staff         963 Sep 14 16:59 server.key
-rwxr-xr-x    1 bob      staff        1784 Sep 14 17:59 sign.sh</pre>
<p>Now, make a directory in your <code>/etc/httpd</code> called <code>ssl.key</code></p>
<pre>sudo mkdir /etc/httpd/ssl.key</pre>
<p>You’ll be prompted for your login password (you have to be in the admin group to use sudo), and the directory will be created.</p>
<p>Move all of the contents of your working directory to the <code>ssl.key</code> directory you just made. In a production system, it would be a very, very bad idea to keep your CA keys, certs and such on the server. If the security of the server is compromised, the ca.crt could be used to “sign” certificate signing requests on any machine. In other words, it gives anyone the power to impersonate you on the internet. Since you’re just using this for testing, and the certificates have bogus information in them, it’s not so terribly important. It is worth noting that this practice would be considered irresponsible on a server accessible to the outside world.</p>
<pre>sudo cp -r * /etc/httpd/ssl.key/</pre>
<p>One more step — and it’s another step that would not have a place in a production environment, but definitely makes life with your development system better: you’re going to remove the passphrase requirement from the server key by removing its encryption.</p>
<p>As things stand, when you start Apache, you will be prompted for a passphrase to read the private key. While this is fine for those who start and stop Apache manually from the command line every time, it does create some problems for those of us who have Apache (a.k.a. Web Sharing) start up automatically every time the system reboots. The system will hang on startup, patiently waiting for a passphrase that will never come — because there’s no way to enter the passphrase you’ve given the key! You’ll have to either boot into Mac OS 9 or boot into verbose mode to clear this problem if you forget.</p>
<p>Removing the pass phrase requirement is dangerous in a production environment, but acceptable for testing (especially if you enter information in your certificate request that makes it clear that this is a testing certificate, and not for production use).</p>
<p>Enter the following:</p>
<pre>cd /etc/httpd/ssl.key
sudo cp server.key server.key.original
sudo openssl rsa -in server.key.original -out server.key</pre>
<p>You’ll be asked for your passphrase for both the <code>sudo</code> command (your system passphrase) and the RSA command (the passphrase for the key). Comparing the two files server.key and server.key.original will show that they are now very different and that server.key.original contains a line stating, “Proc-Type: 4,ENCRYPTED”, that the decrypted file lacks.</p>
<p>Now, you have all of the files you need to make mod_ssl work with Apache. But you still need to configure the Apache server to use mod_ssl. Apple’s engineers have thoughtfully provided Apache compiled with EAPI, which allows modules to be included in Apache without recompiling the server. It makes it a lot easier to enable various modules as you need them.</p>
<p>Stop your web server if you haven’t already, either by using the Sharing control panel or through the command line using:</p>
<pre>sudo apachectl stop</pre>
<p>The file you want to edit is <code>/etc/httpd/httpd.conf</code>. The first thing you want to do is make a backup of the file. Keeping in mind that this directory is owned by root, you will have to use <code>sudo</code> for all of these commands.  So, change directories to /etc/httpd and then make a copy of your httpd.conf.</p>
<pre>cd /etc/httpd
sudo cp httpd.conf httpd.conf.backup</pre>
<p>Now edit your httpd.conf file using the editor of your choice. I use emacs, so the instructions here are for emacs.</p>
<pre>sudo emacs httpd.conf</pre>
<p>First, you need to comment out the “Port” directive by placing a “#” in front of the line.</p>
<p><code>Port 80</code> should be changed to <code>#Port 80</code>. You will need to add the following just below where the Port directive was:</p>
<pre>## SSL Support
##
## When we also provide SSL we have to listen to the
## standard HTTP port (see above) and to the HTTPS port
##

&lt;IfModule mod_ssl.c&gt;
		Listen 443
		Listen 80
&lt;/IfModule&gt;</pre>
<p>Adding these lines tells the server to be aware of traffic on port 80 (the standard HTTP port) and port 443 (the HTTPS port). This allows your SSL aware Apache installation to serve non-secure documents on port 80, while it is serving secure documents on 443.</p>
<p>Continuing on in the httpd.conf file, find the lines that reads:</p>
<pre>#LoadModule ssl_module         libexec/httpd/libssl.so</pre>
<p>and a little further down:</p>
<pre>#AddModule mod_ssl.c</pre>
<p>You need to remove the comments (#) to activate these lines. You can quickly search for these lines by using CTRL + s (in emacs) and typing “ssl”.</p>
<p>The two lines should now look like this:</p>
<pre>LoadModule ssl_module         libexec/httpd/libssl.so

AddModule mod_ssl.c</pre>
<p>Now find the “ServerName” directive and make sure it has 127.0.0.1 for it’s entry.</p>
<pre>ServerName 127.0.0.1</pre>
<p>Finally, just below the last line of the current httpd.conf, enter the following information which covers some of the global SSL directives and the specific directives for the port based virtual hosts.</p>
<pre>&lt;IfModule mod_ssl.c&gt;
# Some MIME-types for downloading Certificates and CRLs
  AddType application/x-x509-ca-cert .crt
  AddType application/x-pkcs7-crl .crl

# inintial Directives for SSL

  # enable SSLv3 but not SSLv2
  SSLProtocol all -SSLv2
  SSLPassPhraseDialog builtin
  SSLSessionCache dbm:/var/run/ssl_scache
  SSLSessionCacheTimeout 300
  SSLMutex file:/var/run/ssl_mutex
  SSLRandomSeed startup builtin
  SSLLog /var/log/httpd/ssl_engine_log
  SSLLogLevel info
##
## SSL Virtual Host Context
##
&lt;VirtualHost 127.0.0.1:80&gt;
  #Just to keep things sane...
    DocumentRoot "/Library/WebServer/Documents"
    ServerName 127.0.0.1
    ServerAdmin bobdavis@mac.com
    SSLEngine off
&lt;/VirtualHost&gt;
&lt;VirtualHost 127.0.0.1:443&gt;
  # General setup for the virtual host
    DocumentRoot "/Library/WebServer/Documents"
  #ServerName has to match the server you entered into the CSR
    ServerName 127.0.0.1
    ServerAdmin bobdavis@mac.com
    ErrorLog /var/log/httpd/error_log
    TransferLog /var/log/httpd/access_log
  # SSL Engine Switch:
  # Enable/Disable SSL for this virtual host.
    SSLEngine on
    # enable SSLv3 but not SSLv2
	SSLProtocol all -SSLv2
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
  # Path to your certificates and private key
    SSLCertificateFile /etc/httpd/ssl.key/server.crt
    SSLCertificateKeyFile /etc/httpd/ssl.key/server.key
    &lt;Files ~ ".(cgi|shtml|phtml|php3?)$"&gt;
      SSLOptions +StdEnvVars
    &lt;/Files&gt;
    &lt;Directory "/Library/WebServer/CGI-Executables"&gt;
      SSLOptions +StdEnvVars
    &lt;/Directory&gt;
# correction for browsers that don't always handle SSL connections well
    SetEnvIf User-Agent ".*MSIE.*"
    nokeepalive ssl-unclean-shutdown
    downgrade-1.0 force-response-1.0
# Per-Server Logging:
# The home of a custom SSL log file. Use this when you want a
# compact non-error SSL logfile on a virtual host basis.
    CustomLog /var/log/httpd/ssl_request_log
    "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x "%r" %b"
&lt;/VirtualHost&gt;
&lt;/IfModule&gt;</pre>
<p>At this point, save your document (CTRL-x CTRL-s) and close emacs (CTRL-x CTRL-c).</p>
<p>There are many directives you can add to the SSL configuration for your machine, including extended logging, restrictions on ciphers used, encryption levels, etc. Full documentation is included in the Apache documents provided with Mac OS X (<code>/Library/Documentation/Services/apache_mod_ssl/index.html</code>) or on-line at <a href="http://www.modssl.org/">http://www.modssl.org/</a>.</p>
<p>Now it’s time to start your SSL enabled web server. You have the option of using either the command line or the Sharing control panel to start your web server. Since you have removed the passphrase requirement from your server key, it’s very simple. Either start Web Sharing from the control panel, or type either of the following lines into the command line:</p>
<pre>sudo httpd -D SSL
sudo apachectl start</pre>
<p>You will be asked for your system password, and you’ll get the output of Apache starting. It’s that simple. If you have Web Sharing set to start at startup it will start normally (this is why we removed the passphrase requirement).</p>
<p>Now test your installation using the browser of your choice by trying to access <a href="https://127.0.0.1/" title="Link to the secure HTTP port on localhost" target="_blank">https://127.0.0.1/</a>. Netscape 6 and Safari provide more information and allow you to accept unknown Certificate Authorities very easily. Microsoft’s Internet Explorer 5.x still has issues with unknown certificate issuers and will fail authentication.</p>
<p>Using Netscape, you’ll see the little open lock in the right corner has become a closed, illuminated lock. Success! You have enabled mod_ssl in your Mac OS X development environment.</p>
<p>Mention of non-Apple products or services is for informational purposes only. Apple assumes no responsibility with regard to the selection, performance, or use of these products.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/osxhosting.wordpress.com/34/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/osxhosting.wordpress.com/34/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/osxhosting.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/osxhosting.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/osxhosting.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/osxhosting.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/osxhosting.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/osxhosting.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/osxhosting.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/osxhosting.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/osxhosting.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/osxhosting.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=34&subd=osxhosting&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://osxhosting.wordpress.com/2008/03/03/mod_ssl-on-a-mac/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bb0ea156c7154f63c261bc6b83587dc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">montanaflynn</media:title>
		</media:content>

		<media:content url="http://developer.apple.com/internet/images/title_modssl.gif" medium="image">
			<media:title type="html">Using mod_ssl on Mac OS X</media:title>
		</media:content>
	</item>
		<item>
		<title>Full Review of OSX Leopard Server</title>
		<link>http://osxhosting.wordpress.com/2008/02/21/full-review-of-osx-leopard-server/</link>
		<comments>http://osxhosting.wordpress.com/2008/02/21/full-review-of-osx-leopard-server/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 17:45:07 +0000</pubDate>
		<dc:creator>montanaflynn</dc:creator>
				<category><![CDATA[Leopard]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[caldav]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[ical]]></category>
		<category><![CDATA[iMIP]]></category>
		<category><![CDATA[iTIP]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[NT domain]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[streaming]]></category>
		<category><![CDATA[webdav]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://osxhosting.wordpress.com/?p=33</guid>
		<description><![CDATA[If you don&#8217;t belong to the cult of Mac, you might ignore the release of Apple&#8217;s new OS X Server 10.5, codenamed Leopard. That would be a shame, particularly for small and midsize enterprises, including those with mixed Apple and Windows clients, or even all-Microsoft shops.

Stop snickering. Apple produces a pretty decent server operating system [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=33&subd=osxhosting&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you don&#8217;t belong to the cult of Mac, you might ignore the release of Apple&#8217;s new OS X Server 10.5, codenamed Leopard. That would be a shame, particularly for small and midsize enterprises, including those with mixed Apple and Windows clients, or even all-Microsoft shops.</p>
<p><img src="http://images.apple.com/server/macosx/features/images/admin_icon20071009.png" alt="Server Admin" class="right icon" style="float:right;margin-left:12px;" border="0" height="103" width="100" /><br />
Stop snickering. Apple produces a pretty decent server operating system and server hardware. We chased Leopard around our Real-World lab and came away pleased on most fronts. This new server OS is ready for work. The e-mail platform connects to Active Directory and bundles AV and anti-spam software without pesky client access licenses. A spiffed-up calendar application can serve as a group scheduler. VPN services can host 500 users per Intel Xserve. In a first for Apple, IP failover provides high availability, and TimeMachine enables easily deployed server-based client backup. Leopard Server can even mimic an NT domain controller.<b> </b></p>
<p><b>Everyone knows Mac is great for creating multimedia. Leopard maintains that reputation, and also makes it easier to distribute content online, including audio, video and photos.</b><span id="more-33"></span></p>
<p>On the downside, Leopard sometimes keeps things too simple. For instance, the calendar service and Web hosting are easy to set up and configure for one-server shops, but may require serious tweaking to function in more complex environments. When hiccups occur during setup or management, experienced administrators may find the built-in help and product documentation lacking. Apple also stumbles with a RADIUS deployment that&#8217;s only checked out for Apple Airport.</p>
<p><b><span class="subheadline">Get To Work</span></b></p>
<p>Apple says it wants to make Leopard a viable option for SMEs and workgroups in larger organizations. To that end, the Leopard dev team significantly overhauled OS X&#8217;s mail server, named Mail (wonder how long it took to think up that one). Leopard improves the client interface and offers ClamAV, SpamAssassin and SSL/TLS to boost security on the server end. Setup and configuration are fairly straightforward when integrated with Apple&#8217;s native Open Directory and LDAP, and Apple&#8217;s directory services can mimic an NT domain controller via Samba 3 for Windows clients, and/or connect to an existing Windows Active Directory.</p>
<div><img src="http://images.apple.com/server/macosx/features/images/admin_hero20071009.png" alt="Mac OS X Server Preferences Screenshot" border="0" height="273" width="485" /></div>
<p>OS X&#8217;s long-in-the-tooth calendar app, iCal, has graduated from single-user productivity tool to group scheduler and is now CalDAV-, iTIP- and iMIP-compliant. iCal supports robust scheduling options for users, groups and other resources listed and tagged in your corporate directory. Anyone familiar with Google Calendar will feel right at home with iCal. While the Exchange team probably isn&#8217;t getting nervous, these upgrades represent a huge leap for Apple in the corporate marketplace and are a solid platform for future development.</p>
<p>Also of note, Mail and iCal Server are free in 10.5, with none of the client-access licenses that Exchange requires. Is anyone outside of Cupertino going to run an enterprise messaging system on iCal and Mail? Probably not. Should a SME look to Leopard as a messaging platform on top of an Apple client base, a mixed Mac/Windows environment or, dare we say it, for a Windows shop? Yes. The price is right, and installation and management are simple.</p>
<p>Apple knows most folks (and IT shops) buy Macs in part for media creation and editing. The iLife suite bundled with every Mac client offers robust photo, video, audio, Web and DVD editing and publishing tools. Leopard has a number of complementary server-side applications to leverage iLife output in the enterprise. Past versions of OS X server bundled Mac-tuned Apache Web servers and other open-source ports for fairly straightforward Web and application hosting. Leopard does a much better job of simplifying the setup and administration of Web services.</p>
<p>And just as iLife simplifies media production on the client end, Leopard&#8217;s integrated Web services, Wiki Server, Quicktime Streaming Server, iChat/Jabber server and Podcast Producer simplify distribution of content. Podcast Producer absorbs feeds from client Macs, processes audio and video, and serves content in a variety of formats. This is neat stuff for a number of reasons: It streamlines content creation, centralizes media repositories, and simplifies the user experience. Podcast Producer is Xgrid-enabled, allowing the Leopard server to bring idle networked Macs into a distributed-computing grid to share the processing load. It&#8217;s render-farm technology brought to the masses.</p>
<p>We built and tore down a number of Web servers, collaborative wikis, and department file shares. We load tested a quad-core Xeon Xserve with twenty real simultaneous Mac and Windows clients against a &#8220;departmental&#8221; wiki-share and Mail server and barely impacted CPU utilization. We tied Leopard to an existing Open Directory/OpenLDAP with 500 users. We auth&#8217;ed a Leopard server to Kerberos. Everything worked just as expected from a network integration perspective.</p>
<p>Leopard&#8217;s initial setup from DVD or network image offers basic choices: Do you want this server to be a basic, workgroup or advanced server? What services do you want to host? Startup helpers load all required services based on your choices at installation, while the streamlined Server Preferences app simplifies management of key services once you&#8217;re up and running. Basic and workgroup configurations offer a streamlined server management application that is almost maddeningly simple for experienced administrators—on/off toggles with minimal configuration options.</p>
<p>The look and feel of the user interface mirrors Leopard client, with more animations, a revised dock, and a number of minor tweaks designed to simplify the look and feel of OS X. Overall this works, especially the automatic clean-up tools that organize the desktop and pop-up animations for dock folder contents. We like the evolutionary changes, and we were surprised at how much we grew to enjoy cover-flow browsing of network resources.</p>
<p><img src="http://images.apple.com/server/macosx/features/images/admin_icons20071009.png" alt="Server Preference Icon" style="float:left;margin-right:12px;" border="0" height="284" width="100" /><br />
Apple offers both a system preloaded with the new OS, or the standalone software. Apple&#8217;s current Xserves (the company&#8217;s name for its server appliances) are a surprisingly good deal: Two dual-core 64-bit Woodcrest Xeons in a base configuration are bundled with an unlimited client 64-bit server OS for under $3,000. It&#8217;s all wrapped in a pretty 1U case to boot. Apple has come a long way from pushing over-priced dual G4 Xserves at educational clients.</p>
<p>If preloading isn&#8217;t to your liking, Apple says its new server OS will run on any Intel or PowerPC G5 server or desktop Mac, and on any G4 Mac clocked at 867MHz or faster. A gig of RAM and 20GB of drive space are your other ticket to the party. Based on our experience, stick with dual-G5 or multi-core Intel Macs with 2GB RAM or better. Lower spec machines will run file or basic network services under Leopard, but will cripple the full feature set.</p>
<p>And let&#8217;s get one thing clear: Leopard server needs a Mac hardware platform to run; you should not try to run OS X on an extra Dell box. All efforts of the OSX86 project aside, you will end up frustrated and dissatisfied with the results.</p>
<p>The installation DVD contains 32- and 64-bit code for Intel and PowerPC Mac platforms. In fact, every in-place build of Leopard is 32/64 and Intel/PPC. To test Apple&#8217;s claims, we built a server on a dual G5 server using an external Firewire drive as our boot partition. We then successfully booted and ran Leopard from the Firewire drive on a six-year-old dual G4 Xserve and a 13&#8243; Macbook (32-bit platforms) and Xeon and G5 Xserves for 64-bit goodness. All platforms had wildly different hardware configurations, yet the OS ran without a single issue on each box, all server functionality intact.</p>
<p>Anyone out there willing to try that with Windows 2003?</p>
<p><b><span class="subheadline">Seeing Spots</span></b></p>
<p>One major knock against the new OS is that the built-in RADIUS service is vetted to support only Apple Airport base stations, though it is based on the open-source FreeRadius. You may get other APs to connect, but this is a significant gaffe if Apple is really serious about positioning Leopard for more than just Apple shops. Owners of PowerPC-based servers hoping to ramp up their podcasting will also be disappointed. It seems Podcast Producer is not universal; the server app is Intel-only due to Apple&#8217;s decision to go with the hardware acceleration in the Quartz-Extreme video chipset offered on all Intel Macs.</p>
<p>And despite the dead-simple installation, not everything was smooth sailing. Though iCal was a breeze to set up when we built a single-server &#8220;workgroup&#8221; configuration on a dual G5 Xserve with 2GB of RAM, we ran into hurdles elsewhere. For instance, we tried to configure iCal on a quad Xeon box configured as a member server in a Mac OS X 10.4 (Tiger) Open Directory environment. We couldn&#8217;t get iCal running without forcing a trusted bind back to our directory master.</p>
<p>We found this solution trolling the Apple support boards. We also found an alternate solution: a command-line edit of /etc/caldavd.plist that we didn&#8217;t have time to test in prep for this review. Two points to take away: We needed to go to the command line on a Mac, and our solution came from the user community. Linux users will appreciate the irony.</p>
<p>Finally, we lost access to one of our test platforms when we &#8220;demoted&#8221; it from a stand-alone directory master to being a member server. We were able to log in via network-based user accounts, but we were unable to administer the box. We ended up paving the installation. Apple rightly pointed out that most users would not be faced with our situation, and that Apple&#8217;s response would most likely be to rebuild, which we did.</p>
<p>On the whole, this is a substantial upgrade to Apple&#8217;s server offering, and we recommend shops running 10.4 to investigate. We also think non-Apple SMEs should take look, whether as a mail server, for collaboration or to facilitate the creation and distribution of multimedia content. OS X 10.5 Leopard is $499 for 10 clients, and $999 unlimited.</p>
<p><i>Joe Hernick is a contributing technical editor with InformationWeek and Network Computing. Write to him at jhernick@nwc.com.</i></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/osxhosting.wordpress.com/33/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/osxhosting.wordpress.com/33/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/osxhosting.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/osxhosting.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/osxhosting.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/osxhosting.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/osxhosting.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/osxhosting.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/osxhosting.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/osxhosting.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/osxhosting.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/osxhosting.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=33&subd=osxhosting&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://osxhosting.wordpress.com/2008/02/21/full-review-of-osx-leopard-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bb0ea156c7154f63c261bc6b83587dc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">montanaflynn</media:title>
		</media:content>

		<media:content url="http://images.apple.com/server/macosx/features/images/admin_icon20071009.png" medium="image">
			<media:title type="html">Server Admin</media:title>
		</media:content>

		<media:content url="http://images.apple.com/server/macosx/features/images/admin_hero20071009.png" medium="image">
			<media:title type="html">Mac OS X Server Preferences Screenshot</media:title>
		</media:content>

		<media:content url="http://images.apple.com/server/macosx/features/images/admin_icons20071009.png" medium="image">
			<media:title type="html">Server Preference Icon</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing WordPress on Tiger</title>
		<link>http://osxhosting.wordpress.com/2008/02/13/installing-wordpress-on-tiger/</link>
		<comments>http://osxhosting.wordpress.com/2008/02/13/installing-wordpress-on-tiger/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 18:03:06 +0000</pubDate>
		<dc:creator>montanaflynn</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[installing]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[osx 10.4]]></category>
		<category><![CDATA[tiger]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://osxhosting.wordpress.com/?p=32</guid>
		<description><![CDATA[Of the many options out there, many people choose to run their own blogging software as opposed to a managed service like Blogger or TypePad.  On the software side, there are many decent tools available, such as Six Apart&#8217;s Movable Type (we have a tutorial for installing MT as well).  WordPress is another [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=32&subd=osxhosting&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Of the many options out there, many people choose to run their own blogging software as opposed to a managed service like <a href="http://www.blogger.com/">Blogger</a> or <a href="http://www.typepad.com/">TypePad</a>.  On the software side, there are many decent tools available, such as Six Apart&#8217;s <a href="http://www.movabletype.org/">Movable Type</a> (we have a <a href="http://maczealots.com/tutorials/movabletype/">tutorial for installing MT</a> as well).  <a href="http://www.wordpress.org/">WordPress</a> is another mature, capable and <b>free</b> blogging engine that is very popular with many bloggers (like its founding developer, <a href="http://photomatt.net/">Matt Mullenweg</a>) and rapidly gaining in popularity across the Web. WordPress is an excellent choice for a personal or professional blog, and the price is right, too. This tutorial will show you how to install WordPress 1.5.1.3 on OS X 10.4 Tiger.<span id="more-32"></span></p>
<p class="box"><b>Note:</b> The most recent version of WordPress is 1.5.1.3, which contains a security patch among other improvements. This tutorial is fully compatible with the most recent version of WordPress. Version 1.5.1.3 is recommended for all WordPress users (<a href="http://codex.wordpress.org/Upgrading_WordPress">upgrade instructions</a>).</p>
<p class="box">If you have installed another blog engine such as WordPress or Movable Type already, you may already have MySQL and/or PHP configured. If this is the case, you can skip right down to step 4.</p>
<p>Before we get started, let&#8217;s summarize what we&#8217;ll be going over in the installation:</p>
<ol>
<li><a href="http://maczealots.com/tutorials/wordpress/#step1">Downloading and Installing WordPress 1.5.1.3</a></li>
<li><a href="http://maczealots.com/tutorials/wordpress/#step2">Enabling Personal Web Sharing</a></li>
<li><a href="http://maczealots.com/tutorials/wordpress/#getmysql">Downloading and Installing MySQL</a></li>
<li><a href="http://maczealots.com/tutorials/wordpress/#configmysql">Configuring MySQL</a></li>
<li><a href="http://maczealots.com/tutorials/wordpress/#php">Enabling and Testing PHP</a></li>
<li><a href="http://maczealots.com/tutorials/wordpress/#wordpress">Configuring WordPress</a></li>
<li>???</li>
<li>Profit!</li>
</ol>
<h3><a title="step1" name="step1"></a>Downloading and Installing WordPress 1.5.1.3</h3>
<p><a href="http://www.wordpress.org/"><img src="http://maczealots.com/tutorials/wordpress/images/wordpress.png" class="padded" alt="WordPress Logo" align="right" /></a>If we&#8217;re going to blog our way to stardom, we&#8217;ll need some blogging software, right?  The first step we&#8217;ll take will be to <a href="http://wordpress.org/download/">download the latest stable version of WordPress</a>, version 1.5.1.3.  The compressed file should be about 250KB, and OS X will decompress it for you.</p>
<p>Once it&#8217;s decompressed, we&#8217;ll move the <code>wordpress</code> directory to OS X&#8217;s Web hosting directory in <code>/Library/WebServer/Documents</code>.  By default, all requests for the domain&#8217;s root directory (like <code>http://maczealots.com/</code>) will go to this directory.  This can be changed in Apache&#8217;s <code>httpd.conf</code> file, which we&#8217;ll cover later.  If you like, you can also change the name of the <code>wordpress</code> directory to something else, like <code>blog</code>.  This way the URL of the blog would change to <code>http://www.yoursite.com/blog/</code>  Additionally, if you want the blog itself to be at the root directory, delete all the items from the <code>/Library/WebServer/Documents</code> directory and move the contents of the <code>wordpress</code> directory to the now-empty <code>Documents</code> folder.</p>
<h3><a title="step2" name="step2"></a>Enabling Personal Web Sharing</h3>
<p>&#8220;Personal Web Sharing&#8221; (PWS) is Apple&#8217;s marketing name for Apache, the industrial-strength, tried-and-true Web server du jour. When you enable PWS, OS X starts up Apache, registers the modules, opens ports, etc. Since we&#8217;ll be serving the blog, we&#8217;ll need to have Apache running.</p>
<p>To enable Personal Web Sharing, open the <i>Sharing</i> preference pane in <i>System Preferences</i>. Check the box labeled &#8220;Personal Web Sharing&#8221;, and that&#8217;s it. (You may have to authenticate as an administrator before it will let you enable anything.) Go ahead and close System Preferences; you&#8217;re ready to install MySQL now.</p>
<p class="box"><b>Note:</b> We are working on a version of this tutorial that includes the ability to host the database with SQLite, which is prepackaged in OS X 10.4. However, support for SQLite in WordPress is still being fully developed, so for now MySQL is still the way to go. If you&#8217;d like to see such an article, <a href="mailto:requests@maczealots.com">let us know</a>.</p>
<h3><a title="getmysql" name="getmysql"></a>Downloading and Installing MySQL</h3>
<p>MySQL is the database backend that WordPress (and other blogging packages like Movable Type) can use to store blog entries, users, comments, etc. MySQL is free for personal use. First, <a href="http://dev.mysql.com/get/Downloads/MySQL-4.0/mysql-standard-4.0.24-apple-darwin7.7.0-powerpc.dmg/from/pick#mirrors">download MySQL</a> (4.0.24 at the time of publication). It will come as disk image with two packages and a readme. We will be installing both packages. First, open the main MySQL installer. It will install all the necessary components to run MySQL onto your OS X volume. After that installer has completed, run the startup item installer, which will automatically start up MySQL after any computer restarts.</p>
<p class="box"><b>Note:</b> One of the most common problems reported is that people install MySQL 4.1 instead of 4.0. I can understand the desire to be on the bleeding edge of software, but WordPress (and most other blog/CMS engines) use an older authentication scheme that is incompatible with MySQL 4.1 and greater. There are hacks and workarounds out there, but for the easiest installation, stick to MySQL 4.0.</p>
<h3><a title="configmysql" name="configmysql"></a>Configuring MySQL</h3>
<p>Now that you have installed MySQL, let&#8217;s configure it so WordPress can access it.  Open a new terminal session (found in <i>/Applications/Utilities/Terminal.app</i>) and type the following commands to navigate, make some changes, and start the MySQL daemon:</p>
<pre><code>cd /usr/local/mysql
sudo chown -R mysql data/
sudo echo
sudo ./bin/mysqld_safe &amp;</code></pre>
<p>Next, let&#8217;s launch MySQL and use the test database (called <code>test</code>, even) to make sure everything&#8217;s running correctly:</p>
<pre><code>/usr/local/mysql/bin/mysql test</code></pre>
<p>If everything&#8217;s running correctly, you should see output similar to this:</p>
<pre><code>Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version 4.0.24-standard

Type 'help;' or '\h' for help.  Type '\c' to clear the buffer.

mysql&gt;</code></pre>
<p>Once you&#8217;ve verified that MySQL is running correctly, use the command <code>quit</code> to return to the console prompt.</p>
<p>Now that MySQL is running, we&#8217;ll change the root password of MySQL so that WordPress (and you) can access it later. Use this command (where <i>yourpasswordhere</i> is replaced by your chosen password):</p>
<pre><code>/usr/local/mysql/bin/mysqladmin -u root password yourpasswordhere</code></pre>
<p>The last thing we&#8217;ll have to do in MySQL is to create a table for WordPress to store its data.  We&#8217;ll call it <code>wordpress</code> to keep things simple.  To accomplish this, we&#8217;ll enter MySQL, create the table, and allow WordPress to edit it.</p>
<pre><code>/usr/local/mysql/bin/mysql -u root -p
CREATE DATABASE wordpress;
quit</code></pre>
<h3><a title="php" name="php"></a>Enabling and Testing PHP</h3>
<p>Now that MySQL is ready to go, let&#8217;s fire up PHP. OS X ships with PHP installed, but not activated. Fortunately, this is really easy to do. The only file we&#8217;ll need to edit is <code>httpd.conf</code>, which Apache uses for its configuration.</p>
<p>Open the config file in your favorite editor (I&#8217;ll be using pico):</p>
<pre><code>sudo pico /etc/httpd/httpd.conf</code></pre>
<p>Mosey on down to the Dynamic Shared Object (DSO) Support section.  It&#8217;s the one with all the <code>LoadModule</code> listings. The one for PHP 4 is towards the bottom of that list. Look for the line and uncomment it to activate it. You can uncomment a line by removing the pound symbol (&#8220;#&#8221;) from the beginning of the line. The new line should look as such:</p>
<pre><code>LoadModule php4_module</code></pre>
<p>We&#8217;ll also need to uncomment the PHP 4 entry in the <code>AddModule</code> listings, so that it looks as such:</p>
<pre><code>AddModule mod_php4.c</code></pre>
<p>Once those two lines are edited you can save the <code>httpd.conf</code> file and quit the editor.  Since we&#8217;ve edited Apache&#8217;s load setup, we need to restart Apache so it will recognize the changes:</p>
<pre><code>sudo apachectl graceful</code></pre>
<p>With that out of the way, let&#8217;s make sure that PHP is indeed running. Create a new text file in your favorite editor (stay away from RTF-happy TextEdit, though &#8211; <a href="http://http//codingmonkeys.de/subethaedit/">SubEthaEdit</a> gets my vote) and fill it with the following text:</p>
<pre><code>&lt;?php
phpinfo();
?&gt;</code></pre>
<p>Save the file as <code>test.php</code> in the root directory (<code>/Library/WebServer/Documents/</code>) and load the address of the page (usually <a href="http://localhost/test.php">http://localhost/test.php</a>) into a Web browser.  If PHP was correctly enabled, the <code>phpinfo();</code> command should output <a href="http://www.entropy.ch/software/macosx/php/test.php">page after page</a> about the PHP installation.  If not, retrace your steps &#8211; it can be easy to make a mistake.</p>
<h3><a title="wordpress" name="wordpress"></a>Configuring WordPress</h3>
<p>Now for the last step: configuring WordPress.  First, you&#8217;ll need to edit WordPress&#8217; default configuration file <code>wp-config-sample.php</code>. You&#8217;ll find it in the root folder of the WordPress installation. This is where you&#8217;ll set up the database information. Edit the following settings:</p>
<p><code>define('DB_NAME', 'wordpress');</code> &#8211; Change &#8216;<code>wordpress</code>&#8216; to the name of the database you created in MySQL (in the example we named it <code>wordpress</code>).<br />
<code>define('DB_USER', 'username');</code> &#8211; change &#8216;<code>username</code>&#8216; to <code>root</code>.<br />
<code>define('DB_PASSWORD', 'password');</code> &#8211; change &#8216;<code>password</code>&#8216; to the MySQL password you chose.</p>
<p>Once you&#8217;ve made the changes, save the file as <code>wp-config.php</code> in the same directory and delete <code>wp-config-sample.php</code>.</p>
<p><a href="http://maczealots.com/tutorials/wordpress/images/wpconfig.png"><img src="http://maczealots.com/tutorials/wordpress/images/wpconfig_thumb.png" class="padded" alt="WordPress Configuration" align="right" /></a>Now, open a Web browser window and start the WordPress installer, found at <code>http://localhost/blog/wp-admin/install.php</code>. (Remember that if you chose to install WordPress in a different directory, such as the root directory, the address will be different for you.) WordPress will take you through the install process and set up the database with all the tables it needs to run.</p>
<p>After it completes, it will give you the login (admin) and password to log in to WordPress. The password is randomly generated and not recoverable so please <b>write it down!</b></p>
<p>After you log in, there are two things you need to immediately do. First, change your password to something you can remember. You can find it in the <i>Users</i> tab of WordPress&#8217; controls. Also, to avoid posting entries as &#8220;Administrator&#8221;, you can either create another account with a posting name, or simply enter a nicknaame in the admin account. But whatever you do, change the password and remember it — once you lose it, your data is hard to get back.</p>
<p>Now comes the moment you&#8217;ve been waiting for.  Click <i>View site »</i> in WordPress&#8217; controls or open a Web browser and go to <code>http://localhost/blog</code> and watch your blog appear! Roll up your sleeves, perfect the CSS, and wax poetic, serving it to the free world without spending a dime on extra software. Happy blogging!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/osxhosting.wordpress.com/32/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/osxhosting.wordpress.com/32/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/osxhosting.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/osxhosting.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/osxhosting.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/osxhosting.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/osxhosting.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/osxhosting.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/osxhosting.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/osxhosting.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/osxhosting.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/osxhosting.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=32&subd=osxhosting&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://osxhosting.wordpress.com/2008/02/13/installing-wordpress-on-tiger/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bb0ea156c7154f63c261bc6b83587dc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">montanaflynn</media:title>
		</media:content>

		<media:content url="http://maczealots.com/tutorials/wordpress/images/wordpress.png" medium="image">
			<media:title type="html">WordPress Logo</media:title>
		</media:content>

		<media:content url="http://maczealots.com/tutorials/wordpress/images/wpconfig_thumb.png" medium="image">
			<media:title type="html">WordPress Configuration</media:title>
		</media:content>
	</item>
		<item>
		<title>Mac OS X Panther Server and SSL</title>
		<link>http://osxhosting.wordpress.com/2008/02/07/mac-os-x-panther-server-and-ssl/</link>
		<comments>http://osxhosting.wordpress.com/2008/02/07/mac-os-x-panther-server-and-ssl/#comments</comments>
		<pubDate>Thu, 07 Feb 2008 17:10:36 +0000</pubDate>
		<dc:creator>montanaflynn</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[certificates]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[server. services]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://osxhosting.wordpress.com/2008/02/07/mac-os-x-panther-server-and-ssl/</guid>
		<description><![CDATA[by Joel Rennich, mactroll@afp548.com
 The purpose of this article is to give you an idea of what you can do with SSL in Mac OS X Server and how you can use that to secure as many services as possible. So, first we’ll talk some about SSL in general and how to create the certificates, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=31&subd=osxhosting&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>by Joel Rennich, <a href="mailto:mactroll@afp548.com">mactroll@afp548.com</a></p>
<p><b> The purpose of this article is to give you an idea of what you can do with SSL in Mac OS X Server and how you can use that to secure as many services as possible. So, first we’ll talk some about SSL in general and how to create the certificates, then we’ll discuss what to do with those certificates.</b><span id="more-31"></span></p>
<h3>SSL certificate creation</h3>
<p>Before we start I’d like to point out that we are going to be creating home-rolled SSL certificates here. As such you will run into problems when connecting to your Server using applications like a Web browser. Most applications will allow you to ignore the fact that your certificate hasn’t been validated by one of the internationally recognized certificate authorities, but it’s still a pain.</p>
<p>I’ll show you how to get around that by importing in your own certificate authority onto your client machines. This presumes that you have control over all of your clients, so for internal use where you control both the server and the client setups being your own certificate authority is great. If you plan on doing business with the general public, such as using it for credit card processing on a Web page, I would strongly recommend that you invest the money in a “real” certificate.</p>
<p>If you do buy one at least take a look at <a href="http://www.qualityssl.com/" target="_blank">www.qualityssl.com</a>. They have really good prices and are Mac-based, so you can keep it in the family.</p>
<p>Also all of the openSSL work, such as generating and signing certificates, can be done on Mac OS X client.</p>
<h3>1. Make a certificate authority (CA).</h3>
<p>This should be done in a secure place, since if your CA gets compromised then all of your security goes out the window. A decent place for this would be on your most secure server or on your own machine.</p>
<p>It doesn’t matter where on the filesystem you do this; however, I personally prefer to create a CA directory in <tt>/etc</tt>:</p>
<pre>sudo mkdir -p /etc/certs
cd /etc/certs</pre>
<p>Right now this folder has fairly relaxed permissions on it. As soon as were done we’ll change that to greatly limit access to the folder. Now that we have our place we need to begin generatng the CA. We do this by making a certificate signing request (CSR). This example will generate a 3DES encrypted 2048 bit key. This is a rather high security key which means it takes longer to process. So if you feel the need you can scale it down to 1024 bits if you like. Although I haven’t had any problems using this with Mac OS X 10.2 and Windows 2000.</p>
<pre>openssl genrsa -des3 -out ca.key 2048</pre>
<p>You will be asked for a passphrase for this key. You need to both remember this phrase and keep it secure. Your entire SSL system will depend on this passphrase being secure.</p>
<p>Now that you have the request you can sign it into a CA.</p>
<pre>openssl req -new -x509 -days 4096 -key ca.key -out ca.crt</pre>
<p>You’ll be asked for the passphrase that you just set up. After that your certificate authority will be valid for 4096 days.</p>
<p>You now have a full blown certificate authority for your machine. From this we will base all of your other certificates from it.</p>
<h3>2. Generate a certificate for your server.</h3>
<p>You will need one for each domain that you have; <i>i.e.</i>, mail.afp548.com and www.afp548.com will each need one if you want to secure both sites.</p>
<p>So first we will generate a new private key.</p>
<pre>openssl genrsa -des3 -out server.key 1024</pre>
<p>You will be prompted for a password here also. This should be different from the password for the CA. Just remember it because you will need to enter it into Server Admin to get SSL running.</p>
<p>Now you need to generate a request with the private key.</p>
<pre>openssl req -new -key server.key -out server.csr</pre>
<p>Again you will be asked for a password. This is the one you entered in the step above. Then you will get a bunch of questions. They all really don’t matter except for common name. This needs to be the fully qualified name of your Web server, like www.afp548.com. If this is wrong you will get errors in the browser. Also: leave the challenge password blank.</p>
<p>Now we need to set up a few folders so that we can actually sign the certificate.</p>
<pre>mkdir -p demoCA/private
cp ca.key demoCA/private/cakey.pem
cp ca.crt demoCA/cacert.pem
mkdir demoCA/newcerts
touch demoCA/index.txt

            echo “01” &gt; demoCA/serial</pre>
<p>You can now actually sign the server certificate with your newly minted CA.</p>
<pre>openssl ca -policy policy_anything -in server.csr -out server.crt</pre>
<p>The password you are prompted for is the password you assigned to the CA, the first one, not to the certificate itself. If you need to create more certificates you will only need to do the last three steps for each.</p>
<p>Finally to keep things secret and to keep things safe, change the permissions on this folder.</p>
<pre>sudo chmod 700 /etc/certs</pre>
<p>Now you can take all of your pieces and make the sites secure.</p>
<h3>3. Securing your web site.</h3>
<p>Go into Server Admin and make sure that the SSL module is enabled in the modules pane under settings.</p>
<p>Then go to the site that you want to secure. Change the port to 443, click on the security button, and enable SSL by checking the box at the top. Then you need to open up some of the files that you have created in TextEdit, or any text editor, and copy and paste them into the three appropriate spots. Copy <tt>server.crt</tt> into “Certificate File.” Copy <tt>server.key</tt> into “Key File,” and copy <tt>ca.crt</tt> into “CA File.&#8221;</p>
<p>Finally, you’ll want to enter the passphrase for the server certificate into the “Pass Phrase” field or else you’ll have to be at the server everytime it starts up.</p>
<p>A few parting thoughts about securing Web connections. You will need a separate IP address for every SSL site that you have. There’s a complicated reason for this, but it involves how SSL connections begin and I don’t know of any way around this. In 10.2 you had to edit the <tt>httpd_macosxserver.conf</tt> file to get higher level encryption. This requirement seems to be gone in 10.3 as it defaults to using all ciphers.</p>
<p>When you are done your certificates will be stored in <tt>/etc/httpd/ssl.crt</tt> and <tt>/etc/httpd/ssl.key</tt>. Your site’s specific config is stashed in <tt>/etc/httpd/sites/<i>your site’s name</i></tt>. So look in there for any specific info. Also the passphrase that you used is stashed in <tt>/etc/httpd/servermgr_web_httpd_config.plist</tt>, which is root-readable only.</p>
<h3>4. Securing LDAP</h3>
<p>We run into a bit of a problem here. OpenLDAP doesn’t like a server key that has a passpharse associated with it. Postfix and Cyrus are going to be the same way. So remove the passphrase.</p>
<pre>openssl rsa -in server.key -out serverno.key</pre>
<p>Now go back into Server Admin. Select the Open Directory settings and go to the “Protocols” tab. Check the “Use SSL” box and then put the path to your certificates in the three fields.</p>
<pre>Certificate: /etc/certs/server.crt
SSL Key: /etc/certs/serverno.key
CA Certificate: /etc/certs/ca.crt</pre>
<p>OpenSSL runs as root, so it will be able to get into <tt>/etc/certs</tt> without any issues. As soon as you save this config Server Admin will restart OpenLDAP with SSL support.</p>
<p>The SSL configuration for OpenLDAP is stored in <tt>/etc/openldap/slapd_macosxserver.conf</tt>.</p>
<h3>5. Securing SMTP</h3>
<p>Postfix can be setup to use the same certificate as the one you established for openLDAP. However, it wants to have both the key and the certificate in the same file. This is easily done.</p>
<pre>sudo cat /etc/certs/serverno.key /etc/certs/server.crt &gt; /etc/certs/server.pem</pre>
<p>Now link that file to what Postfix is looking for.</p>
<pre>ln -s /etc/certs/server.pem /etc/postfix/</pre>
<p>Now reload Postfix through the GUI or by doing this from the command line.</p>
<pre>sudo postfix reload</pre>
<p>And start using encrypted SMTP services.</p>
<p>The SSL configuration for Postfix is kept in <tt>/etc/postfix/main.cf</tt>.</p>
<h3>6. Securing POP/IMAP</h3>
<p>Cyrus can use the same certificate as Postfix, but it needs to be accessible by the cyrus user. That requires relaxing the permission a bit on the certificate store.</p>
<pre>sudo chown :mail /etc/certs
sudo chmod 750 /etc/certs
sudo chmod -R 700 /etc/certs/demoCA</pre>
<p>Now you can link the <tt>server.pem</tt> file into where Cyrus POP and IMAP want to find it.</p>
<pre>ln -s /etc/certs/server.pem /var/imap/server.pem</pre>
<p>Now go into Server Admin and set up POP/IMAP to use SSL in the Advanced button of the Mail Server settings.</p>
<p>Set your mail client accordingly and securely read your mail.</p>
<p>The SSL configuration for Cyrus is stored in <tt>/etc/imap.conf</tt>.</p>
<h3>7. Enable your clients</h3>
<p>Since your CA is self-signed all of your Mac OS X applications and services will yell at you for using it. You can get around this by adding the cert to the client’s x509 Anchors keychain. Essentially this is the root CA file for your machine.</p>
<p>Do this by copying over to the client machine the <tt>ca.crt</tt> file that you created in the first step. Then install it by doing</p>
<pre>sudo certtool i ca.crt v k=/System/Library/Keychains/x509Anchors</pre>
<p>Your client will now trust certificates that you have signed into being with this CA. If you do this right, you’ll use the same CA for all of your servers and their services. That way you’ll only have to import one file into the clients x509Anchors.</p>
<h3>8. E-mail certs</h3>
<p>This bit is for bonus points, but all the cool kids are doing it and so should you. Mail.app in 10.3 allows the use of s/mime certificates. These are PKI certificates that act similar to SSL certificates and can sign and or encrypt e-mail.</p>
<p>The easiest way for a personal user to get a certificate is to head over to <a href="http://www.thawte.com/" target="_blank">www.thawte.com</a> and sign up for their free community mail certificate. Really good instructions for this can be found here:</p>
<p><a href="http://joar.com/certificates/" target="_blank">http://joar.com/certificates/</a></p>
<p>However, if for some reason you feel like making your own, read on. Note that this is mostly an exercise in what you can do with OpenSSL. Since the Thawte certificates are free and easily available you’re probably better off using them. However, if you want to outfit your entire organization with home rolled certificates, well here you go. Just be careful to only use this between users that have imported your root CA that you created.</p>
<p>To do this you need to first generate a certificate for your e-mail user. This is pretty much the same thing as generating one for a server.</p>
<pre>openssl genrsa -des3 -out mail.key 1024</pre>
<p>Give it a pass phrase to lock it up.</p>
<pre>openssl req -new -key mail.key -out mail.csr</pre>
<p>Here, you’ll want to use your real name for the Common Name. Joel Rennich is what I would use. Then make sure that you fill out the e-mail field with what you have set up in Mail.app as your e-mail address. Capitalization is important here. I would use “mactroll@afp548.com&#8221;.</p>
<p>Now sign this cert with your CA.</p>
<pre>openssl ca -policy policy_anything -in mail.csr -out mail.crt</pre>
<p>You’ll enter in your CA password and then commit the signature.</p>
<p>Finally you can convert the signed certificate into the format that is used for s/mime. When you do this it will first ask you for your mail certificate password that you set up a few commands before. Then it will ask you for an export password. This can be the same of different, it doesn’t matter, but you will need to use the export password when importing this certificate into your Keychain so you can use it with mail.</p>
<pre>openssl pkcs12 -export -inkey mail.key -certfile mail.crt -in mail.crt -out mactroll.p12</pre>
<p>This is your “official” e-mail certificate. Copy this over to your client machine and double-click. Keychain Access should launch and ask you for your export password. The certificate will then be imported into your keychain and immediately usable by Mail.app for the account that you specified in the e-mail field when you generated it.</p>
<h3>9. Other odds and ends</h3>
<p>When you sign your certificates with your CA openssl uses a default config file which can be found at <tt>/System/Library/OpenSSL/openssl.cnf</tt>. If you want to change any of the defaults go here. For example, certificates that you sign will only be valid for 1 year, unless you edit this file to change that.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/osxhosting.wordpress.com/31/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/osxhosting.wordpress.com/31/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/osxhosting.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/osxhosting.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/osxhosting.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/osxhosting.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/osxhosting.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/osxhosting.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/osxhosting.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/osxhosting.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/osxhosting.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/osxhosting.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=31&subd=osxhosting&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://osxhosting.wordpress.com/2008/02/07/mac-os-x-panther-server-and-ssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bb0ea156c7154f63c261bc6b83587dc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">montanaflynn</media:title>
		</media:content>
	</item>
		<item>
		<title>W3C HTML Validator on OS X</title>
		<link>http://osxhosting.wordpress.com/2008/01/30/w3c-html-validator-on-os-x/</link>
		<comments>http://osxhosting.wordpress.com/2008/01/30/w3c-html-validator-on-os-x/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 18:06:17 +0000</pubDate>
		<dc:creator>montanaflynn</dc:creator>
				<category><![CDATA[Leopard]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[compliant]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[modern]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[validator]]></category>
		<category><![CDATA[WC3]]></category>

		<guid isPermaLink="false">http://macosxhosting.wordpress.com/2008/01/30/w3c-html-validator-on-os-x/</guid>
		<description><![CDATA[
Building a website is a complicated process, and testing your finished product on every possible browser can be even more daunting.  However, because modern browsers such as Safari, Mozilla, and Internet Explorer 6 are compliant with the World Wide Web Consortium&#8217;s (W3C) standards, testing your pages with the W3C Validation Tool is a great [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=27&subd=osxhosting&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h1><img src="http://developer.apple.com/internet/images/title_validator.gif" alt="Installing the W3C HTML Validator on Mac OS X" height="48" width="342" /></h1>
<p>Building a website is a complicated process, and testing your finished product on every possible browser can be even more daunting.  However, because modern browsers such as Safari, Mozilla, and Internet Explorer 6 are compliant with the <a href="http://w3.org/">World Wide Web Consortium&#8217;s (W3C)</a> standards, testing your pages with the W3C Validation Tool is a great way to ensure that your pages work with modern browsers. The W3C Validator provides a line-by-line level of feedback, such as error information with references to the standards, on any URL you submit or HTML file you upload.</p>
<p>But what if your pages are accessible only within your firewall? Or what if your organization is reluctant to have their pages submitted to any external site for validation—even if it&#8217;s fully automated?<span id="more-27"></span> This article describes how you can host the same W3C standards validation service within the confines of your own network and security constraints. You just need to download a number of open-source components that are freely available, and then configure them properly. By following this recipe, you will have an internal validation tool that will not only be accessible to your web developers as needed, but can actually be integrated into your production process. You have the code—you can make it fit your workflow.</p>
<h2>Validator Files</h2>
<p>First be sure to have the <a href="http://developer.apple.com/tools/xcode/">Xcode Tools 1.5</a> or higher installed.</p>
<p>Besides the Xcode Tools, you need to download the validator and supporting files:<br />
Base Code: <a href="http://validator.w3.org/validator.tar.gz">http://validator.w3.org/validator.tar.gz</a><br />
DTD Library: <a href="http://validator.w3.org/sgml-lib.tar.gz">http://validator.w3.org/sgml-lib.tar.gz</a></p>
<p>Once you download these files, you need to decompress them, move them to the proper location, and set the permissions for the executable file. The above downloaded files will download to your downloads folder, ours was on the Desktop, as shown below. Do this in the Terminal Window. The following is an example of where to move the files to (assuming they were downloaded to your desktop).</p>
<pre>Welcome to Darwin!
macosx:~ macosx$ cd Desktop
macosx:~/Desktop macosx$ tar xf validator.tar
macosx:~/Desktop macosx$ tar xf sgml-lib.tar
macosx:~ macosx$ cd /Library/WebServer/Documents
macosx:/Library/WebServer/Documents/ macosx$ mkdir validator/
macosx:/Library/WebServer/Documents/ macosx$ cp -R ~/Desktop/validator-0.7.0/ validator/
macosx:/Library/WebServer/Documents/ macosx$ cd validator/htdocs/
macosx:/Library/WebServer/Documents/validator/htdocs macosx$ cp ../httpd/cgi-bin/check .
macosx:/Library/WebServer/Documents/validator/htdocs macosx$ sudo chmod 755 check</pre>
<h2>Edit the validator.conf file</h2>
<p>Now, edit the validator.conf file (located at /Library/WebServer/Documents/validator/htdocs/config/validator.conf) with your favorite text editor. Do not cut and paste from the example file below, this will create an invalid config file.</p>
<ol>
<li>Change the &#8216;Maintainer&#8217; email address on line 73 to your email address.</li>
<li>Change the &#8216;Home Page&#8217; URL on line 77 to the correct URL for your installation.</li>
<li>Uncomment &amp; change the base path of &#8216;/usr/local/validator&#8217; to &#8216;/Library/WebServer/Documents/validator&#8217; on line 24.</li>
<li>Change &#8216;SGML Parser&#8217; from &#8216;/usr/bin/onsgmls&#8217; to &#8216;/sw/bin/onsgmls&#8217; on line 37, this is where Fink will install the OpenSP software later in these instructions.</li>
<li>Save the file.</li>
</ol>
<p>Here is what our file looked like when we finished:</p>
<pre>#
# Main Configuration File for the W3C Markup Validation Service.
#
# $Id: validator.conf,v 1.24 2005/07/08 08:31:09 ot Exp $
#
# See 'perldoc Config::General' for the syntax, and be aware that the
# 'SplitPolicy' is 'equalsign', ie. keys and values are separated by '\s*=\s*',
# and that 'InterPolateVars' is in effect.
#

#
# Base Path for Markup Validator files.
#
# You MUST set these unless you use the default locations for the files.
# e.g. the config files in "/etc/w3c/" and everything else in
# "/usr/local/validator/".
#
# Make sure all file paths below do NOT end with a slash

&lt;Paths&gt;
  #
  # Base path.  Defaults to the value of the W3C_VALIDATOR_HOME environment
  # variable or /usr/local/validator if the variable does not exist.
  Base = /Library/WebServer/Documents/validator

  #
  # Location of template files
  Templates = $Base/share/templates

  &lt;SGML&gt;
    #
    # The SGML Library Path.
    Library = $Base/htdocs/sgml-lib

    #
    # The SGML Parser to use.  Defaults to /usr/bin/onsgmls.
    Parser = /sw/bin/onsgmls
  &lt;/SGML&gt;
&lt;/Paths&gt;

#
# This controls whether the debugging options are allowed to be enabled.
Allow Debug = yes

#
# This lets you permanently enable the debugging options. Can be overridden
# with CGI options (unlike "Allow Debug" above).
Enable Debug = no

#
# Whether private RFC1918 addresses are allowed.
Allow Private IPs = no

#
# Whether the (highly experimental!) SOAP support should be enabled.
Enable SOAP = no

#
# Whether the validator will check its own output.
# 0 means it will refuse to check its own output, 1 means it will but it will
# refuse to check the results of it checking itself. Etc.
Max Recursion = 0

#
# Protocols the validator is allowed to use for retrieving documents.
# The default is to allow http and https.
&lt;Protocols&gt;
  Allow = data,http,https
&lt;/Protocols&gt;

#
# Email address of the maintainer of this service.
Maintainer = web-dev@lists.apple.com

#
# The "Home Page" for the service.  Make sure this ends with a slash.
Home Page = http://localhost/validator/htdocs/

#
# Base URI for the Element Reference.
Element Ref URI = http://www.htmlhelp.com/reference/html40/

#
# Mapping tables etc...
#

#
# Maps element names to URLs (cf. "Element Ref URI" above).
&lt;Elements&gt;
  Include eref.cfg
&lt;/Elements&gt;

#
# Main document Type Registry; contains all information on the types
# of documents we support and how they are processed.
&lt;Types&gt;
  Include types.conf
&lt;/Types&gt;

#
# Mapping of charset names to their IANA names and how iconv(3) knows them.
&lt;Charsets&gt;
  Include charset.cfg
&lt;/Charsets&gt;

#
# Map MIME Media Type to Parse Mode mapping.
&lt;MIME&gt;
  text/xml              = XML
  image/svg             = XML
  image/svg+xml         = XML
  application/smil      = XML
  application/xml       = XML
  text/html             = TBD
  text/vnd.wap.wml      = XML
  application/xhtml+xml = XML
  application/mathml+xml = XML
&lt;/MIME&gt;

#
# Source for the "Tip of The Day" blurbs.
&lt;Tips&gt;
  Include tips.cfg
&lt;/Tips&gt;</pre>
<p>Once you have edited this file, you need to move it to the proper location. Again, do this in the Terminal Window, as shown below.</p>
<pre>Welcome to Darwin!
macosx:~ macosx$  cd /etc
macosx:/etc macosx$ sudo mkdir w3c
macosx:/etc macosx$ cd w3c
macosx:/etc/w3c macosx$ sudo cp /Library/WebServer/Documents/validator/htdocs/config/*.* .</pre>
<h2>Edit the apache httpd.conf file</h2>
<p>Now, edit the apache config file—this example uses the application pico—to tell apache some information about the validator; we again use the Terminal Window for this:</p>
<pre>Welcome to Darwin!
macosx:~ macosx$ sudo pico /etc/httpd/httpd.conf</pre>
<p>This opens the apache config file into the pico text editor. Scroll to the bottom of the file and add the following lines:</p>
<pre># This is the directory where you have the validator's "check"
# script as well as its and *.html, *.css etc files.

&lt;Directory /Library/WebServer/Documents/validator/htdocs&gt;
  Options              ExecCGI IncludesNOEXEC Indexes MultiViews
  AllowOverride        None
  AddHandler           server-parsed .html
  AddCharset           utf-8         .html
&lt;/Directory&gt;

# Tell httpd that "check" is a CGI script.

&lt;Location "/validator/htdocs/check"&gt;
  SetHandler           cgi-script
&lt;/Location&gt;</pre>
<p>Save the file by pressing Control-X and answering &#8216;Y&#8217; to the prompt.</p>
<p>Now, restart personal web sharing from the Terminal Window:</p>
<pre>Welcome to Darwin!
macosx:~ macosx$ sudo apachectl graceful</pre>
<h2>Install Fink &amp; OpenSP</h2>
<p>Install Open SP (this is needed in order for the validator to run). The easiest way to install Open SP is via <a href="http://fink.sourceforge.net/">Fink</a>. Follow the <a href="http://fink.sourceforge.net/download/index.php?phpLang=en">Fink Installation Instructions</a> for Mac OS X if you don&#8217;t already have Fink installed.</p>
<p>Once you have completed a full Fink installation and Fink selfupdate, then install OpenSP via Fink, using the Terminal Window:</p>
<pre>Welcome to Darwin!
macosx:~ macosx$ Fink install openSP3</pre>
<h2>Installing the Necessary Perl Modules</h2>
<p>The easiest way to install the required Perl modules is via CPAN. The W3C has provided a CPAN bundle that will install all the required Perl modules. If this is the first time you are using CPAN, you must first go through a configuration of CPAN. All the default answers to the prompts should be sufficient—just press the Return key at each prompt.</p>
<p>Open the Terminal Window and run CPAN:</p>
<pre>Welcome to Darwin!
macosx:~ macosx$ sudo perl -MCPAN -e shell</pre>
<p>After configuring CPAN, you get a <code>cpan&gt;</code> command prompt. Now you are ready to install the bundle via CPAN as shown below. You will need to accept &#8216;recursively get missing modules&#8217;</p>
<pre>cpan&gt; install Bundle::W3C::Validator</pre>
<h2>Success!</h2>
<p>Your validator should now be working now at <a href="http://localhost/validator/htdocs/">http://localhost/validator/htdocs/</a> on your local Mac.</p>
<p>If you have any questions or comments, you can post to the <a href="http://lists.apple.com/mailman/listinfo/web-dev">Apple Web Development Mailing List</a>.</p>
<p>This article was tested on Mac OS X (10.4). The original panther tested version of this article is located at <a href="http://developer.apple.com/internet/opensource/validatorpanther.html">http://developer.apple.com/internet/opensource/validatorpanther.html</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/osxhosting.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/osxhosting.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/osxhosting.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/osxhosting.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/osxhosting.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/osxhosting.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/osxhosting.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/osxhosting.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/osxhosting.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/osxhosting.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/osxhosting.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/osxhosting.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=27&subd=osxhosting&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://osxhosting.wordpress.com/2008/01/30/w3c-html-validator-on-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bb0ea156c7154f63c261bc6b83587dc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">montanaflynn</media:title>
		</media:content>

		<media:content url="http://developer.apple.com/internet/images/title_validator.gif" medium="image">
			<media:title type="html">Installing the W3C HTML Validator on Mac OS X</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing MySQL on on Mac OS X</title>
		<link>http://osxhosting.wordpress.com/2008/01/30/installing-mysql-on-on-mac-os-x/</link>
		<comments>http://osxhosting.wordpress.com/2008/01/30/installing-mysql-on-on-mac-os-x/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 18:04:28 +0000</pubDate>
		<dc:creator>montanaflynn</dc:creator>
				<category><![CDATA[Leopard]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://macosxhosting.wordpress.com/2008/01/30/installing-mysql-on-on-mac-os-x/</guid>
		<description><![CDATA[
MySQL has become one of the most popular databases for Web applications. The database is well suited for common Web-related tasks like content management, and for implementing Web features like discussion boards and guestbooks. For a time, some developers avoided MySQL for commercial applications because it did not implement certain features, such as transactions. But [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=26&subd=osxhosting&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h1><img src="http://developer.apple.com/internet/images/title_osdb.gif" alt="MySQL on Mac OS X" height="33" width="680" /></h1>
<p>MySQL has become one of the most popular databases for Web applications. The database is well suited for common Web-related tasks like content management, and for implementing Web features like discussion boards and guestbooks. For a time, some developers avoided MySQL for commercial applications because it did not implement certain features, such as transactions. But this is no longer the case, and MySQL is a great choice for just about any Web-based application.<span id="more-26"></span></p>
<p>In this article I’ll give you an overview of MySQL’s features and drawbacks, show you how to install MySQL on Mac OS X, and introduce you to some of MySQL’s notable technical aspects.</p>
<h2>MySQL Features</h2>
<p>Perhaps the most prominent feature of MySQL is its speed when running SQL SELECT statements. MySQL was built for speed. The core of the MySQL engine is very small and streamlined, and the default table type (a modified ISAM table) was designed specifically for running SELECTs quickly. If your application calls for the advantages of a relational structure but the database contents are relatively static — as is often the case with Web content — MySQL’s speed is a great advantage.</p>
<p>MySQL is also undeniably stable. In both your production and serving environments, you can be reasonably confident that MySQL will be up and processing queries as long as power flows to your machine.</p>
<p>Another important benefit is that MySQL is relatively easy to learn. Even if you’re new to relational databases, you can learn MySQL and create very sophisticated Web applications in a short period of time.</p>
<p>The popularity of MySQL is a benefit as well, because if you run into difficulty, you can lean on the active community that supports MySQL. There are many mailing lists dedicated to MySQL, and most questions find quick and thorough answers.</p>
<h2>MySQL Drawbacks</h2>
<p>If you are an advanced database user, you should be aware of some of MySQL’s limitations. MySQL’s implementation of standard query language is missing support for sub-selects, foreign key constraints (for some table types), stored procedures, and views. If you feel you need these features, you’re probably better off looking into PostgreSQL, FrontBase, or another database.</p>
<p>Lack of support for transactions <i>used</i> to be a drawback of MySQL, but this has been addressed. Now, on Mac OS X, you can use the MySQL InnoDB table type and have access to row-level locking and robust transaction support, as well as foreign key constraints.</p>
<h2>Installing MySQL</h2>
<p>If you’re running Mac OS X Server, you are in luck — MySQL is already there. Just go to Applications/Server/MySQL Manager to access it. If you are running Mac OS X Client, you’ll have to install MySQL. if you have already installed a version of MySQl and want to upgrade, I can recommend the <a href="http://www.entropy.ch/software/MacOSx/mysql/">upgrade instructions</a> from http://www.entropy.ch. For a new installation, follow the Mac OS X installation instructions for the MySQL provided binary distribution ( a true Mac OS X installer package file) at <a href="http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html">http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html</a> and be done with it. However, sometimes you want to compile and install directly from the source, either because you are changing the default build settings, or you want the latest and greatest version before there’s a binary installer. The following will help you through that process.</p>
<p>When installing MySQL, you need to be aware of the potential effect this will have on the security of your system, as a database server can open an avenue of attack. In the example below, I show how to install MySQL on Mac OS X while maintaining the security of your system.</p>
<p>One basic security tenet is that of “least 				privilege.” In short, this means that everyone and 				everything should have only the privileges required for 				it to complete its task(s). Those privileges should be 				available for the least amount of time possible—ideally, once the task is completed, the privileges 				should be revoked.</p>
<p>I’m also 				choosing to build MySQL from source, rather than install 				a pre-built binary. This gives greater control over the 				installation, as you’ll see below.</p>
<h2>Configuring and Compiling MySQL</h2>
<p>I plan to install mysql in <code>/usr/local/mysql</code>. I also plan to locate the mysql UNIX socket under the <code>/usr/local/mysql/</code> directory as <code>/usr/local/mysql/run/mysql_socket</code> so that it will be publicly available, but associated with the MySQL installation. Note that in a standard installation, the socket file would be placed in <code>/tmp</code>.</p>
<p>You can now <a href="http://www.mysql.com/downloads/">download the source</a> via a Web browser.</p>
<p>Once you have the source, you can pretty much follow the <a href="http://dev.mysql.com/doc/refman/5.0/en/quick-install.html">quick install directions</a> from the mysql documentation pages, adding only debug support (<code> — with-debug</code>) and the build environment comment (<code> — with-comment</code>). The <code>configure</code> command should look like:</p>
<pre>./configure --prefix=/usr/local/mysql
--with-unix-socket-path=/usr/local/mysql/run/mysql_socket
--with-mysqld-user=mysql --with-comment --with-debug</pre>
<p>Once the configuration completes, running <code>make</code>, and then <code>sudo make install</code>, installs mysql in <code>/usr/local/mysql</code>. Running <code>sudo /usr/local/mysql/bin/mysql_install_db --force</code> adds the <code>var/</code> space for databases and creates the default databases (mysql and test). You also need to add the <code>run/</code> directory where the mysql UNIX socket will live, with <code>sudo mkdir /usr/local/mysql/run</code>. Once all of that is done, a directory listing should look like:</p>
<pre>% ls -Fla /usr/local/mysql/
total 26
drwxr-xr-x 13 root wheel 1024 Jun 5 13:42 ./
drwxr-xr-x 11 root wheel 1024 Jun 5 12:19 ../
drwxr-xr-x  2 root wheel 1024 Jun 5 12:20 bin/
drwxr-xr-x  3 root wheel 1024 Jun 5 12:19 include/
drwxr-xr-x  2 root wheel 1024 Jun 5 12:19 info/
drwxr-xr-x  3 root wheel 1024 Jun 5 12:19 lib/
drwxr-xr-x  2 root wheel 1024 Jun 5 12:20 libexec/
drwxr-xr-x  3 root wheel 1024 Jun 5 12:20 man/
drwxr-xr-x  6 root wheel 1024 Jun 5 12:21 mysql-test/
drwxr-xr-x  2 root wheel 1024 Jun 5 13:42 run/
drwxr-xr-x  3 root wheel 1024 Jun 5 12:20 share/
drwxr-xr-x  7 root wheel 1024 Jun 5 12:21 sql-bench/
drwx------  4 root wheel 1024 Jun 5 13:37 var/</pre>
<p>Note that at this point everything is owned by root — meaning the mysql account won’t be able to write to the databases under <code>var/</code> nor be able to create the mysql UNIX socket in the <code>run/</code> directory. Since we want to run the MySQL database under the mysql account, and <b>not</b> under the root account, we need to change the group association of <code>/usr/local/mysql</code> to the group mysql, and the ownership of <code>/usr/local/mysql/run</code> and <code>/usr/local/mysql/var</code> to the mysql account, as follows:</p>
<pre>sudo chgrp -R mysql /usr/local/mysql
sudo chown -R mysql /usr/local/mysql/run /usr/local/mysql/var</pre>
<p>The directory listing now looks like:</p>
<pre>% ls -Fla /usr/local/mysql
total 26
drwxr-xr-x 13 root  mysql 1024 Jun 5 13:42 ./
drwxr-xr-x 11 root  wheel 1024 Jun 5 12:19 ../
drwxr-xr-x  2 root  mysql 1024 Jun 5 12:20 bin/
drwxr-xr-x  3 root  mysql 1024 Jun 5 12:19 include/
drwxr-xr-x  2 root  mysql 1024 Jun 5 12:19 info/
drwxr-xr-x  3 root  mysql 1024 Jun 5 12:19 lib/
drwxr-xr-x  2 root  mysql 1024 Jun 5 12:20 libexec/
drwxr-xr-x  3 root  mysql 1024 Jun 5 12:20 man/
drwxr-xr-x  6 root  mysql 1024 Jun 5 12:21 mysql-test/
drwxr-xr-x  2 mysql mysql 1024 Jun 5 13:42 run/
drwxr-xr-x  3 root  mysql 1024 Jun 5 12:20 share/
drwxr-xr-x  7 root  mysql 1024 Jun 5 12:21 sql-bench/
drwx------  4 mysql mysql 1024 Jun 5 13:37 var/</pre>
<p>You can now start mysql and perform a few important tasks, like setting a mysql password to protect the database itself. Note that, while starting the database requires system root privileges, actions within the database itself do not require system root privileges, but database root privileges. It is somewhat confusing that MySQL uses the account name “root” for its all-powerful account, just as the system does, even though they are completely separate entities.</p>
<p>Starting mysql is accomplished with:</p>
<pre>sudo /usr/local/mysql/bin/mysqld_safe --user=mysql &amp;</pre>
<p>Now you can run through some of the basic tests — but first, go ahead and secure the database by adding a password for the database “root” user, as follows:</p>
<pre>/usr/local/mysql/bin/mysqladmin -u root password sniggle</pre>
<p>Here “sniggle” is the password you are assigning to the database root account. In MySQL, a single user is associated with a username and a host. Most often on your development machine you will be connecting to the database locally, so the host will be “localhost”. However, if you are attempting to connect from a different machine, you will have to assign permissions based on both username and hostname. For more information on users and passwords within MySQL, <a href="http://dev.mysql.com/doc/mysql/en/GRANT.html">read about</a> MySQL’s grant tables, and the <code>grant</code> and <code>revoke</code> statements.</p>
<h2>Conclusion</h2>
<p>MySQL is a great database for Web applications and a great complement to a Mac OS X development environment. Install it on your machine and create applications in Perl, PHP, JSP, or whatever languages you like best. To administer a MySQL installation on Mac OS X, you can look to popular tools such as the Web-based <a href="http://www.phpmyadmin.net/home_page/">phpMyAdmin</a> from <a href="http://www.phpwizard.net/">phpwizard.net</a>, or <a href="http://www.rtlabs.com/macsql/">MacSQL</a> from <a href="http://www.rtlabs.com/">Runtime Labs</a>.</p>
<p>For information about starting MySQL on startup, see <a href="http://www.osxfaq.com/Tutorials/LearningCenter/HowTo/Startup/index.ws">this article</a> from macosxfaq.com.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/osxhosting.wordpress.com/26/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/osxhosting.wordpress.com/26/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/osxhosting.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/osxhosting.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/osxhosting.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/osxhosting.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/osxhosting.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/osxhosting.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/osxhosting.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/osxhosting.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/osxhosting.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/osxhosting.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=26&subd=osxhosting&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://osxhosting.wordpress.com/2008/01/30/installing-mysql-on-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bb0ea156c7154f63c261bc6b83587dc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">montanaflynn</media:title>
		</media:content>

		<media:content url="http://developer.apple.com/internet/images/title_osdb.gif" medium="image">
			<media:title type="html">MySQL on Mac OS X</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting up an OS X development server</title>
		<link>http://osxhosting.wordpress.com/2008/01/29/setting-up-an-os-x-development-server/</link>
		<comments>http://osxhosting.wordpress.com/2008/01/29/setting-up-an-os-x-development-server/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 21:34:47 +0000</pubDate>
		<dc:creator>montanaflynn</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Leopard]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[sharing]]></category>

		<guid isPermaLink="false">http://macosxhosting.wordpress.com/2008/01/29/setting-up-an-os-x-development-server/</guid>
		<description><![CDATA[Okay, so this was very much a case of fumbling around in the dark until stuff worked, lot&#8217;s of Googling and breaking stuff. The end result is a dev server on OS X that is running Textpattern with clean URLs and a copy of WordPress for good measure. These notes are primarily so I don&#8217;t [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=25&subd=osxhosting&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Okay, so this was very much a case of fumbling around in the dark until stuff worked, lot&#8217;s of Googling and breaking stuff. The end result is a dev server on OS X that is running Textpattern with clean URLs and a copy of WordPress for good measure. These notes are primarily so I don&#8217;t forget how I did it, if they are useful to someone else, great! Be warned, though, I have no idea how secure this set up is and what flaws it has, so you <b>follow these instructions at your own risk</b>! Also, I am using OS 10.3.9 so I don&#8217;t know if this would work on Tiger.<span id="more-25"></span></p>
<h3>Turn off Personal Web Sharing</h3>
<p>OS X does, as you probably know, ship with Apache and it&#8217;s real easy to switch on and for a while I did use it. I am quite interested in learning a bit more about the whole serving up websites business, so first job is to do away with all the pre-installed Mac stuff.</p>
<p>Go to System Preferences &gt; Sharing and make sure Personal Web Sharing is stopped.</p>
<p><img src="http://joshuaink2006.johnoxton.co.uk/images/190.jpg" alt=" " /></p>
<h3>Software</h3>
<p>I started off with <a href="http://www.webedition-cms.com/english/downloads/mamp.php">Mamp</a> and that is probably good enough for a basic set up but I wanted to run Textpattern with clean URLs. Getting mod_rewrite to work on Mamp just wouldn&#8217;t happen for me. So after a bit of Googling I came up with these downloads in preparation for my mission&#8230; gulp!</p>
<ul>
<li><a href="http://www.serverlogistics.com/mysql.php">Complete MySQL</a></li>
<li><a href="http://www.serverlogistics.com/apache2.php">Complete Apache2</a></li>
<li><a href="http://www.serverlogistics.com/php4.php">Complete PHP4 </a></li>
<li><a href="http://cocoamysql.sourceforge.net/">CocoaMySQL</a></li>
<li><a href="http://homepage.mac.com/darkshadow02/apps.htm">Web Control</a> (Scroll down the page a bit)</li>
</ul>
<h3>Terminal</h3>
<p>You will need to have at hand Terminal in order to do some of the stuff. This is located in Applications &gt; Utilities. This is the best bit actually because you get to feel like <a href="http://www.imdb.com/title/tt0133093/">Neo</a> for five minutes! Be careful though, I am told you can do some serious damage with Terminal.</p>
<h3>Show hidden files</h3>
<p>Having already had a play with <a href="http://www.webedition-cms.com/english/downloads/mamp.php">Mamp</a>, I noticed that I couldn&#8217;t see .htaccess files. Also when installing Complete MySQL there was another hidden file I needed to get to. Eventually I found a note on <a href="http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/additionalfeatures/chapter_10_section_7.html">Apple&#8217;s developer site</a> that describes how to show hidden files. It&#8217;s gonna make your Mac look at little messier than before but it&#8217;s kind of essential:</p>
<p>Open up Terminal and type in the following:</p>
<p><code>defaults write com.apple.Finder AppleShowAllFiles true</code></p>
<p>And that should be that.</p>
<h3>Complete installs</h3>
<p>The links to the three Complete packages are self explanatory. Each comes with a detailed Install document, follow them and you can&#8217;t go wrong, much.</p>
<p>The only problem I ran into was creating a .bash_profile document in the home directory. With hidden files now showing I could see that my home directory (the house with my name on it) had no .bash_profile in it, so I created one with TextEdit. Again, something to watch out for is TextEdit saving it with an extension e.g. .bash_profile.rdf. If this happens click on the file and press COMMAND + I which will bring up the File Info panel and you can simply delete the .rdf from the Name &amp; Extensions panel</p>
<p><img src="http://joshuaink2006.johnoxton.co.uk/images/185.jpg" alt=" " /></p>
<p>In truth this had little effect for me when trying to access mysql via Terminal, unless I used the complete path i.e. /Library/MySQL/bin/mysql. Given that I have no intention of using Terminal for accessing MySQL I didn&#8217;t worry about it and it has not had any impact on this setup thus far. <b>Note:</b> If anyone <i>does</i> know why I was getting a command not found error, I&#8217;d love to know.</p>
<p>One other note with these complete installs is the location they end up in. Obvious now but it caused me a bit of confusion, they are in the root library file and not the library file in you home directory. To find this spot open up your hard drive and look for the Library folder</p>
<p><img src="http://joshuaink2006.johnoxton.co.uk/images/187.jpg" alt=" " /></p>
<h3>phpMyAdmin versus CocoaMySQL</h3>
<p>I had a bash at installing phpMyAdmin but to be honest they may as well have written the instructions in Wookie. I stumbled across CocoaMySQL after a bit of Googling, opened it up, it found the path to my MySQL server and within five minutes I had created a database as was running a local copy of Joshuaink. I thoroughly recommend it for the less technically minded.</p>
<p>Also worth noting is that which ever way you access MySQL, you can use your root account and the password you set when setting up MySQL for all your databases which is pretty damn convenient.</p>
<p><img src="http://joshuaink2006.johnoxton.co.uk/images/186.jpg" alt=" " /></p>
<h3>Httpd.config</h3>
<p>Certainly if you are going to be experimenting, the httpd.config file will come into play. I started off with the Web Control app because it makes back ups, reverts easily back to the original file if you mess it up and it can check your syntax for you and if you aren&#8217;t feeling confident it&#8217;s a great way to start. It soon started to get a bit frustrating though because I couldn&#8217;t do a find search to locate bits of the document.</p>
<p>I ended up going back to TextEdit but found I could no longer save the file from that app (though I could from Web Control). I am not sure if this happens by default or whether Web Control did it when it first ran but it turned out that the conf directory, located at /Library/Apache2/conf was locked, so again clicking on the directory and COMMAND + I brings up the info and I changed the Ownership &amp; Permissions details from Owner: system to Owner: [my username]. I also did the same to the httpd.conf file for good measure and made sure they were both set to Read &amp; Write for owners.</p>
<p><img src="http://joshuaink2006.johnoxton.co.uk/images/189.jpg" alt=" " /></p>
<h3>Virtual hosts</h3>
<p>Virtual hosts were one of the big things I wanted to get done and I found two tutorials. <a href="http://mezzoblue.com/archives/2004/08/05/virtual_host/index.php">One over at Mezzoblue</a> and <a href="http://www.sitepoint.com/article/os-x-web-development">one over at SitePoint</a> (scroll down the tutorial a bit). In the end I opted for the SitePoint one because it was getting late and my head seemed to manage with it a little better, though the URLs it produces are no where near as cool as Dave&#8217;s. Again something to consider if you do use the SitePoint one, be careful with your naming conventions because it can impact how you use the web. For example I had a directory called joshuaink and where I used to just type joshuaink &#8212; as opposed to the full URL &#8212; into Firefox to reach my live site, I was now being taken to my localhost.</p>
<h3>DirectoryIndex</h3>
<p>It wasn&#8217;t until I opened up the WordPress admin that I noticed I was getting a directory listing and had to manually click on index.php to get to the login page. This seems to be something to do with the DirectoryIndex bit of httpd.conf. Initially I was dropping the .htaccess file that ships with Textpattern into each and every directory with an index.php as it&#8217;s starting point and it <i>did</i> solve the problem but that was getting a bit tiresome. Eventually I found out that there is something called DirectoryIndex in the httpd.conf file and having located it I changed it to this so that Apache recognises an index.php:</p>
<p><code>DirectoryIndex index.html index.htm index.php index.html.var</code></p>
<p>I really don&#8217;t know if that is correct but it seems to have solved the problem.</p>
<h3>Deleting .htaccess files</h3>
<p>My final problem was deleting those .htaccess files I had spread everywhere and OS X wouldn&#8217;t let me because it is a hidden file. To solve this I renamed it to .htaccess.txt and then I could delete it.</p>
<p><img src="http://joshuaink2006.johnoxton.co.uk/images/188.jpg" alt=" " /></p>
<h3>Conclusions</h3>
<p>I have got a lot to learn about Apache but it was an interesting start and well worth the effort. With my iBook mostly offline, security is not a big deal for me. No doubt I will continue to fiddle until it breaks. If you have any tips or see something very wrong with the way I have setup, please do say.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/osxhosting.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/osxhosting.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/osxhosting.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/osxhosting.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/osxhosting.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/osxhosting.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/osxhosting.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/osxhosting.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/osxhosting.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/osxhosting.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/osxhosting.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/osxhosting.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=25&subd=osxhosting&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://osxhosting.wordpress.com/2008/01/29/setting-up-an-os-x-development-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bb0ea156c7154f63c261bc6b83587dc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">montanaflynn</media:title>
		</media:content>

		<media:content url="http://joshuaink2006.johnoxton.co.uk/images/190.jpg" medium="image">
			<media:title type="html"> </media:title>
		</media:content>

		<media:content url="http://joshuaink2006.johnoxton.co.uk/images/185.jpg" medium="image">
			<media:title type="html"> </media:title>
		</media:content>

		<media:content url="http://joshuaink2006.johnoxton.co.uk/images/187.jpg" medium="image">
			<media:title type="html"> </media:title>
		</media:content>

		<media:content url="http://joshuaink2006.johnoxton.co.uk/images/186.jpg" medium="image">
			<media:title type="html"> </media:title>
		</media:content>

		<media:content url="http://joshuaink2006.johnoxton.co.uk/images/189.jpg" medium="image">
			<media:title type="html"> </media:title>
		</media:content>

		<media:content url="http://joshuaink2006.johnoxton.co.uk/images/188.jpg" medium="image">
			<media:title type="html"> </media:title>
		</media:content>
	</item>
		<item>
		<title>Mac OSX Server FTP Server Administration</title>
		<link>http://osxhosting.wordpress.com/2008/01/29/mac-osx-server-ftp-server-administration/</link>
		<comments>http://osxhosting.wordpress.com/2008/01/29/mac-osx-server-ftp-server-administration/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 21:15:27 +0000</pubDate>
		<dc:creator>montanaflynn</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Leopard]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Xserve]]></category>
		<category><![CDATA[accounts]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[ftpchroot]]></category>
		<category><![CDATA[lukemftpd]]></category>
		<category><![CDATA[NetInfo]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://macosxhosting.wordpress.com/2008/01/29/mac-osx-server-ftp-server-administration/</guid>
		<description><![CDATA[FTP Only Accounts Under Mac OS X
The following howto describes how to set up ftp only accounts using Apple Mac&#8217;s built in ftp server (lukemftpd).
This outline requires you to use the terminal, NetInfo Manager and have admin privileges on the machine in question.
Warning: You can muck things up quite seriously using NetInfo Manager. At the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=24&subd=osxhosting&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h2>FTP Only Accounts Under Mac OS X</h2>
<p>The following howto describes how to set up ftp only accounts using Apple Mac&#8217;s built in ftp server (lukemftpd).</p>
<p>This outline requires you to use the terminal, NetInfo Manager and have admin privileges on the machine in question.</p>
<p><b>Warning:</b> You can muck things up quite seriously using NetInfo Manager. At the very least make sure you have a recent, full back-up of the machine you&#8217;re planning to setup before going any further.</p>
<p>To create ftp only accounts we need to:</p>
<ol>
<li>Create an ftp login shell</li>
<li>Restrict our prospective ftp user to their folder</li>
<li>Create the user account</li>
<li>Create a folder for the new user</li>
<li>Give the user a password</li>
</ol>
<h3>Create An FTP Login Shell</h3>
<p>To create an ftp login shell we need to copy or link /sbin/nologin to /sbin/ftplogin. We&#8217;ll create a symbolic link from /sbin/nologin to /sbin/ftplogin. To do this:</p>
<ol>
<li>Fire up Terminal</li>
<li>Type &#8220;sudo ln -s /sbin/nologin /sbin/ftplogin&#8221; (without the quotes)</li>
<li>Hit return</li>
<li>Type in your admin user&#8217;s password when prompted</li>
</ol>
<p>Now we need to add the new &#8220;shell&#8221; to the list of shells available to the system. To do this we need to add &#8220;/sbin/ftplogin&#8221; to the list of shells given in the file found at /etc/shells. In Terminal:</p>
<ol>
<li>Type &#8220;sudo pico /etc/shells&#8221;. This&#8217;ll open up the file &#8220;shells&#8221; in a simple text editor in Terminal</li>
<li>Hit return</li>
<li>Type in your admin user&#8217;s password if prompted</li>
<li>Add the string &#8220;/sbin/ftplogin&#8221; (without the quotes) on a new line at the end of the list of shells available. This&#8217;ll give you a final list similar to:
<p>/bin/bash<br />
/bin/csh<br />
/bin/sh<br />
/bin/tcsh<br />
/bin/zsh<br />
/sbin/ftplogin</li>
<li>Type ctl + &#8220;o&#8221;. That&#8217;s the letter &#8220;o&#8221; while holding down the control key</li>
<li>Hit return</li>
<li>Type ctl + &#8220;x&#8221; to eXit Pico</li>
</ol>
<h3>Restrict User To Their Folder</h3>
<p>We&#8217;re setting this up now so that as soon as the user we&#8217;re creating gains access to our machine, they&#8217;re restricted to their log-in or root folder. All we have to do is create the file /etc/ftpchroot if it doesn&#8217;t exist and then add the prospective user&#8217;s username to the file.</p>
<ol>
<li>In Terminal, type &#8220;cd /etc&#8221; (without the quotes. From here on in, I&#8217;ll assume you&#8217;re ignoring the quotes)</li>
<li>Check to see whether the file &#8220;ftpchroot&#8221; exists. If it doesn&#8217;t, type &#8220;sudo touch ./ftpchroot&#8221; and give you admin password if prompted for it</li>
</ol>
<p>Now we need to add the username to the created file. Using pico:</p>
<ol>
<li>In Terminal type &#8220;sudo pico ./ftpchroot&#8221;. This&#8217;ll open up the file &#8220;ftpchroot&#8221; in a simple text editor in Terminal</li>
<li>Type in your prospective ftp user&#8217;s username. Ours is &#8220;fred&#8221;. For safety, make the username all lowercase letters only &#8211; although we&#8217;ll let you have the underscore (&#8220;_&#8221;) too.</li>
<li>Type ctl + &#8220;o&#8221;. That&#8217;s the letter &#8220;o&#8221; while holding down the control key</li>
<li>Hit return</li>
<li>Type ctl + &#8220;x&#8221; to eXit Pico</li>
</ol>
<h3>Create User Account</h3>
<p>We do this in NetInfo Manager. I&#8217;m going to talk you through doing this the long winded way &#8211; but once you&#8217;ve got one account set-up, I&#8217;d suggest you duplicate an existing account and modify it as appropriate.</p>
<ol>
<li>Fire up NetInfo Manager</li>
<li>At the bottom of the pane, click the little lock symbol and supply your admin username and password to unlock NetInfo Manager</li>
<li>In the lefthand column, select &#8220;/&#8221;</li>
<li>In the middle column select &#8220;users&#8221;</li>
<li>Click the &#8220;New&#8221; icon at the top of the pane. This will create a new user called &#8220;new_directory&#8221;.</li>
</ol>
<p>Now we need to modify this user account to give it the properties we&#8217;re after. Some of these properties will depend on your setup and how you want to administer your machine. We&#8217;ll use some reasonable settings but you may want to change these.</p>
<p>Before we go further, we do need to check what the next available user id (uid) is. To do this, click through your users in NetInfo Manager (ignoring the system users if you know what these are) making a note of the highest uid. In my case it&#8217;s 503. This means that my next user is going to be 504. Alternatively, start a new series for ftp users starting at 601.</p>
<p>Having done this, with the user &#8220;new_directory&#8221; selected in NetInfo Manager:</p>
<ol>
<li>Select the &#8220;name&#8221; property in the bottom half of the pane. Double click on the Value &#8220;new_directory&#8221; to select it and type in your username. In our example our username, as added to the ftpchroot file is &#8220;fred&#8221; &#8211; so that&#8217;s what we&#8217;ll type here.</li>
<li>Create a new property by clicking in the &#8220;New&#8221; icon at the top of the pane. This will create a new property called &#8220;new_property&#8221;. Change the property value to &#8220;uid&#8221;. Now change its value &#8220;new_value&#8221; to the next available uid &#8211; or, if you&#8217;re starting a new series, 601.</li>
<li>Add a new property for the group id &#8211; &#8220;gid&#8221;. We&#8217;ll set this to &#8220;20&#8243;. i.e. Create the new property, select &#8220;new_property&#8221; and type &#8220;gid&#8221;. Select &#8220;new_value&#8221; and type &#8220;20&#8243;.</li>
<li>Follow this procedure to add:<br />
<table border="0" cellpadding="0" cellspacing="0" width="222">
<tr>
<th>Property</th>
<th></th>
<th>Value(s)</th>
</tr>
<tr>
<td>expire</td>
<td>&nbsp;</td>
<td>0</td>
</tr>
<tr>
<td>change</td>
<td>&nbsp;</td>
<td>0</td>
</tr>
<tr>
<td>shell</td>
<td>&nbsp;</td>
<td>/sbin/ftplogin</td>
</tr>
<tr>
<td>home</td>
<td>&nbsp;</td>
<td>/Users/&lt;username&gt;</td>
</tr>
</table>
<p>Where the text &#8220;&lt;username&gt;&#8221; in the last property (&#8220;home&#8221;) is the username of the user you&#8217;re adding. In our example &#8220;fred&#8221;. So the value for the property &#8220;home&#8221; would be &#8220;/Users/fred&#8221;. This means the bottom of your NetInfo Manager pane should end up looking something like:</p>
<table border="0" cellpadding="0" cellspacing="0" width="222">
<tr>
<th>Property</th>
<th></th>
<th>Value(s)</th>
</tr>
<tr>
<td>home</td>
<td>&nbsp;</td>
<td>/Users/fred</td>
</tr>
<tr>
<td>shell</td>
<td>&nbsp;</td>
<td>/sbin/ftplogin</td>
</tr>
<tr>
<td>change</td>
<td>&nbsp;</td>
<td>0</td>
</tr>
<tr>
<td>expire</td>
<td>&nbsp;</td>
<td>0</td>
</tr>
<tr>
<td>gid</td>
<td>&nbsp;</td>
<td>20</td>
</tr>
<tr>
<td>uid</td>
<td>&nbsp;</td>
<td>504</td>
</tr>
<tr>
<td>name</td>
<td>&nbsp;</td>
<td>fred</td>
</tr>
</table>
<p><b>2006-04-18</b>: We&#8217;ve been contacted by Esben Sørensen and Antoine Durr over the weekend, both of whom make the observation that &#8220;realname&#8221; needs to be added to the properties listed here. i.e. we should end up with:</p>
<table border="0" cellpadding="0" cellspacing="0" width="222">
<tr>
<th>Property</th>
<th></th>
<th>Value(s)</th>
</tr>
<tr>
<td>home</td>
<td>&nbsp;</td>
<td>/Users/fred</td>
</tr>
<tr>
<td>shell</td>
<td>&nbsp;</td>
<td>/sbin/ftplogin</td>
</tr>
<tr>
<td>change</td>
<td>&nbsp;</td>
<td>0</td>
</tr>
<tr>
<td>expire</td>
<td>&nbsp;</td>
<td>0</td>
</tr>
<tr>
<td>gid</td>
<td>&nbsp;</td>
<td>20</td>
</tr>
<tr>
<td>uid</td>
<td>&nbsp;</td>
<td>504</td>
</tr>
<tr>
<td>name</td>
<td>&nbsp;</td>
<td>fred</td>
</tr>
<tr>
<td>realname</td>
<td>&nbsp;</td>
<td>Fred</td>
</tr>
</table>
<p>So, add the &#8220;realname&#8221; property &#8220;else the account&#8217;s system preference pane will henceforth come up blank due to an incorrect/invalid realname&#8221; (Antoine Durr).</p>
<p>Thanks to Esben and Antoine.</li>
<li>Make sure you remember the uid as you&#8217;ll need it in a sec.</li>
<li>Close NetInfo Manager saving and confirming the save as you go.</li>
</ol>
<h3>Create A User Folder</h3>
<p>We need to create a user folder and then change its ownership (and permissions) to reflect those of the newly created user.</p>
<ol>
<li>In Terminal, type &#8220;cd /Users&#8221;. Typing &#8220;ls&#8221; will give you a list of all the users on your machine</li>
<li>Type &#8220;mkdir &lt;username&gt;&#8221; where &lt;username&gt; is the new user&#8217;s username. We&#8217;ll be typing &#8220;mkdir fred&#8221;</li>
<li>Change the owner of this file by typing &#8220;sudo chown &lt;uid&gt;:20 ./&lt;username&gt;. Where &lt;uid&gt; is the uid for the user you added (and made a mental note of) and &lt;username&gt; is the username&#8230;. OK. You&#8217;ve got the idea. Oh. If your prompted for a password, give your admin password.</li>
<li>Change the permissions of this file so that we can all access it (if you know what you&#8217;re doing here, set the permissions as you see fit). &#8220;sudo chmod 777 ./&lt;username&gt;&#8221;</li>
</ol>
<p>Now we&#8217;re on the home stretch.</p>
<h3>Give The User A Password</h3>
<p>The next step is to give the newly created user a password. To do this, in Terminal:</p>
<ol>
<li>Type &#8220;sudo passwd &lt;username&gt;&#8221;. (So we&#8217;ll be typing &#8220;sudo passwd fred&#8221;).</li>
<li>Type in the new password at the prompt.</li>
<li>Retype it as prompted.</li>
</ol>
<h3>NAT?</h3>
<p>If you&#8217;re behind a router or firewall which does Network Address Translation (NAT), there&#8217;s one more thing. Passive FTP requires the machine offering the FTP service to return its IP address and a port on which it&#8217;ll be listening. If you&#8217;re on a NATed network, it&#8217;s likely that the FTP server is going to return its internal IP number rather than the external address you&#8217;d prefer it to give. To get around this:</p>
<p>Create the file /etc/ftpd.conf</p>
<p>Add the line &#8220;advertise all &lt;host&gt;&#8221; where &lt;host&gt; is either the host name or external IP address for the FTP server.</p>
<h3>Done</h3>
<p>Restart the FTP server to ensure that all the caches are flushed and then see whether you can log-in via ftp as the new user. The easiest way of doing this is to turn FTP off and then on again in System Preferences -&gt; Sharing.</p>
<h3></h3>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/osxhosting.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/osxhosting.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/osxhosting.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/osxhosting.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/osxhosting.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/osxhosting.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/osxhosting.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/osxhosting.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/osxhosting.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/osxhosting.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/osxhosting.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/osxhosting.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=24&subd=osxhosting&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://osxhosting.wordpress.com/2008/01/29/mac-osx-server-ftp-server-administration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bb0ea156c7154f63c261bc6b83587dc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">montanaflynn</media:title>
		</media:content>
	</item>
		<item>
		<title>Transfer Between Mac OSX Host with Windows XP Guest in VirtualBox</title>
		<link>http://osxhosting.wordpress.com/2008/01/28/transfer-between-mac-osx-host-with-windows-xp-guest-in-virtualbox/</link>
		<comments>http://osxhosting.wordpress.com/2008/01/28/transfer-between-mac-osx-host-with-windows-xp-guest-in-virtualbox/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 17:30:25 +0000</pubDate>
		<dc:creator>montanaflynn</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Shared]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[XP]]></category>

		<guid isPermaLink="false">http://macosxhosting.wordpress.com/2008/01/28/transfer-between-mac-osx-host-with-windows-xp-guest-in-virtualbox/</guid>
		<description><![CDATA[Until the latest version of VirtualBox (1.4.1) released for Mac, there are still no support for the Host Interface networking option enabled yet. Moreover, you even could not see the NIC card got working on Mac OSX running in some Intel Machine (Jas 10.4.8) since it didn’t recognized properly with the built-in driver. So, is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=23&subd=osxhosting&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img src="http://virtualbox.org/graphics/vbox_logo2_gradient.png" style="float:left;cursor:pointer;margin:0 10px 10px 0;" border="0" />Until the latest version of VirtualBox (1.4.1) released for Mac, there are still no support for the Host Interface networking option enabled yet. Moreover, you even could not see the NIC card got working on Mac OSX running in some Intel Machine (Jas 10.4.8) since it didn’t recognized properly with the built-in driver. So, is there anyway to get a simple networking between both OS? Sure it does.</p>
<p>FYI, file transfer in a Shared Folders option allow you to access files of your Mac OSX system from within the Windows XP guest system, much like ordinary shares on Windows networks would – except that shared folders do not need a networking setup. Sharing is accomplished using a special service on the host and a file system driver for the guest, both of which are – fortunately &#8211; provided by VirtualBox. In order to use this feature, the VirtualBox Guest Additions have to be installed in guest OS. Currently, shared Folders are limited to Windows XP, Windows 2000 and Linux 2.4 and 2.6 guests. To share a folder with a virtual machine in VirtualBox, you must specify the path of the folder to be shared on the host and chose a “<span style="font-style:italic;">share name</span>” that the guest can use to access it.</p>
<p><img src="http://members.lycos.co.uk/pegadaian2004/gudang_gambar/vboxsvr1.jpg" style="display:block;text-align:center;cursor:pointer;margin:0 auto 10px;" border="0" /></p>
<p>Then, you can mount the shared folder from inside a VM the same way as you would mount an ordinary network share.<br />
In Windows XP guest, use the following formula command:<br />
<span style="font-style:italic;"></p>
<blockquote><p>net use x: \\vboxsvr\sharename</p></blockquote>
<p></span>While vboxsvr is a fixed name, replace “x:“ with the drive letter that you want to use for the share, and sharename with the share name specified before.</p>
<p>To simplify this, I used to create a batch file which can executed manually to mount all of the 4 shared folder name (1 NTFS partition for Windows XP, 2 FAT32 partition for data &amp; 1 HFS Mac OSX partition) specified before after the guest OS shows up. For example, named it with vboxsvr.bat and the picture below is the values:</p>
<p><img src="http://members.lycos.co.uk/pegadaian2004/gudang_gambar/vboxsvr2.jpg" style="display:block;text-align:center;cursor:pointer;margin:0 auto 10px;" border="0" /></p>
<p>You can also create a link for the batch file &amp; move it to on a someplace you like for example in a quick launch panel.</p>
<p><img src="http://members.lycos.co.uk/pegadaian2004/gudang_gambar/vboxsvr3.jpg" style="display:block;text-align:center;cursor:pointer;margin:0 auto 10px;" border="0" /></p>
<p>To test the script, simply click the shortcut file until it processed completely. If it succeeded, the script will create new networking drives available assigned next to the drive letter defined before on the batch file.</p>
<p><img src="http://members.lycos.co.uk/pegadaian2004/gudang_gambar/vboxsvr4.jpg" style="display:block;text-align:center;cursor:pointer;margin:0 auto 10px;" border="0" /></p>
<p>However, I still don’t understand why it marked with <span style="font-weight:bold;">Disconnected Network Drive</span> label although files &amp; folders on both OS is accessible as you may seen on ordinary full permission shared drives.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/osxhosting.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/osxhosting.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/osxhosting.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/osxhosting.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/osxhosting.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/osxhosting.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/osxhosting.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/osxhosting.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/osxhosting.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/osxhosting.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/osxhosting.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/osxhosting.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=osxhosting.wordpress.com&blog=2660922&post=23&subd=osxhosting&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://osxhosting.wordpress.com/2008/01/28/transfer-between-mac-osx-host-with-windows-xp-guest-in-virtualbox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bb0ea156c7154f63c261bc6b83587dc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">montanaflynn</media:title>
		</media:content>

		<media:content url="http://virtualbox.org/graphics/vbox_logo2_gradient.png" medium="image" />

		<media:content url="http://members.lycos.co.uk/pegadaian2004/gudang_gambar/vboxsvr1.jpg" medium="image" />

		<media:content url="http://members.lycos.co.uk/pegadaian2004/gudang_gambar/vboxsvr2.jpg" medium="image" />

		<media:content url="http://members.lycos.co.uk/pegadaian2004/gudang_gambar/vboxsvr3.jpg" medium="image" />

		<media:content url="http://members.lycos.co.uk/pegadaian2004/gudang_gambar/vboxsvr4.jpg" medium="image" />
	</item>
	</channel>
</rss>