<?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/"
	>

<channel>
	<title>Vlad Alexa&#039;s Blog &#187; webserver</title>
	<atom:link href="http://blog.vladalexa.com/tag/webserver/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.vladalexa.com</link>
	<description>software , networks , apple , open source</description>
	<lastBuildDate>Thu, 15 Jul 2010 22:38:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>setting up osx as web server</title>
		<link>http://blog.vladalexa.com/2009/03/17/setting-up-osx-as-web-server/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=setting-up-osx-as-web-server</link>
		<comments>http://blog.vladalexa.com/2009/03/17/setting-up-osx-as-web-server/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 22:27:00 +0000</pubDate>
		<dc:creator>vlad</dc:creator>
				<category><![CDATA[osx]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[macosx]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://vladalexa.com/wordpress/?p=6</guid>
		<description><![CDATA[By default OSX comes with the industry standard apache web server , only OSX server comes with a mysql server however and none are configured my default for php. Fortunately enabling both php and installing mysql is trivial on OSX compared even to linux 1 &#8211; enable php in apache (basically edit the config file [...]]]></description>
			<content:encoded><![CDATA[<p>By default OSX comes with the industry standard apache web server , only OSX server comes with a mysql server however and none are configured my default for php.</p>
<div>Fortunately enabling both php and installing mysql is trivial on OSX compared even to linux</div>
<div><strong>1 &#8211; enable php in apache (basically edit the config file uncommenting php module)</strong></div>
<div><strong>HOWTO :</strong></div>
<div>type in terminal</div>
<div>
<blockquote><p>sudo pico /etc/apache2/httpd.conf</p></blockquote>
</div>
<div>press the down arrow untill you see this line</div>
<div>
<blockquote><p>#LoadModule php5_module        libexec/apache2/libphp5.so</p></blockquote>
</div>
<div>delete the &#8220;#&#8221; at the start of the line by pressing right arrow and delete</div>
<div>press ctrl+x</div>
<div>press y</div>
<div>press enter</div>
<div>(you need to use console to edit this file because osx has no way to access that file in a open file window from any program)</div>
<div><strong>2- install mysql </strong></div>
<div><strong>HOWTO:</strong></div>
<div>go and <a href="http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg">download</a> the package for your architecture and osx version , install it and the pref pane</div>
<div>open System Preferences and click MySQL &gt; Start MySQL Server</div>
<div>open terminal and type :</div>
<div>
<blockquote><p>/usr/local/mysql/bin/mysqladmin -u root password &#8220;MYPASS&#8221;</p></blockquote>
<blockquote><p>/usr/local/mysql/bin/mysqladmin -u root -h MYHOSTNAME password &#8220;MYPASS&#8221;</p></blockquote>
</div>
<div>change MYPASS to what you want your mysql password to be and MYHOSTNAME to the machine&#8217;s hostname (it is shown in terminal along with your user name like this [myuser@myhostname:~])</div>
<div><strong>3 &#8211; done</strong> , you are the owner of a AMP (apache/mysql/php) server , now you can harness the huge amount of free web software running on this ,</div>
<div>as a test that everything worked fine you can install <span style=" ;font-family:-webkit-sans-serif;">phpMyAdmin as you will probably need it anyway , go to <span style="font-family:Georgia;"><a href="http://www.phpmyadmin.net">http://www.phpmyadmin.net</a></span><span style=" ;font-family:Georgia;"> and extract it to  /Library/WebServer/Documents/phpmyadmin </span></span></div>
<div>open /Library/WebServer/Documents/phpmyadmin/config.default.inc.php in a text editor</div>
<div>find</div>
<div>
<blockquote><p>$cfg['Servers'][$i]['host'] = &#8216;localhost&#8217;;</p></blockquote>
<p>and replace localhost with your hostname</p></div>
<div>save the file as /Library/WebServer/Documents/phpmyadmin/config.inc.php</div>
<div>done , open <a href="http://myhostname/phpmyadmin">http://myhostname/phpmyadmin</a> and login with user: root , password:what you set before</div>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.vladalexa.com/2009/03/17/setting-up-osx-as-web-server/&amp;title=setting+up+osx+as+web+server" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://blog.vladalexa.com/2009/03/17/setting-up-osx-as-web-server/&amp;t=setting+up+osx+as+web+server" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=setting+up+osx+as+web+server&amp;body=Link: http://blog.vladalexa.com/2009/03/17/setting-up-osx-as-web-server/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A By%20default%20OSX%20comes%20with%20the%20industry%20standard%20apache%20web%20server%20%2C%20only%20OSX%20server%20comes%20with%20a%20mysql%20server%20however%20and%20none%20are%20configured%20my%20default%20for%20php.%0D%0AFortunately%20enabling%20both%20php%20and%20installing%20mysql%20is%20trivial%20on%20OSX%20compared%20even%20to%20linux%0D%0A1%20-%20enable%20php%20in%20apache%20%28basically%20edit%20the" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.vladalexa.com/2009/03/17/setting-up-osx-as-web-server/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://blog.vladalexa.com/2009/03/17/setting-up-osx-as-web-server/&amp;title=setting+up+osx+as+web+server&amp;srcUrl=http://blog.vladalexa.com/2009/03/17/setting-up-osx-as-web-server/&amp;srcTitle=setting+up+osx+as+web+server&amp;snippet=By%20default%20OSX%20comes%20with%20the%20industry%20standard%20apache%20web%20server%20%2C%20only%20OSX%20server%20comes%20with%20a%20mysql%20server%20however%20and%20none%20are%20configured%20my%20default%20for%20php.%0D%0AFortunately%20enabling%20both%20php%20and%20installing%20mysql%20is%20trivial%20on%20OSX%20compared%20even%20to%20linux%0D%0A1%20-%20enable%20php%20in%20apache%20%28basically%20edit%20the" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://blog.vladalexa.com/2009/03/17/setting-up-osx-as-web-server/&amp;t=setting+up+osx+as+web+server" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://blog.vladalexa.com/2009/03/17/setting-up-osx-as-web-server/&amp;title=setting+up+osx+as+web+server&amp;summary=By%20default%20OSX%20comes%20with%20the%20industry%20standard%20apache%20web%20server%20%2C%20only%20OSX%20server%20comes%20with%20a%20mysql%20server%20however%20and%20none%20are%20configured%20my%20default%20for%20php.%0D%0AFortunately%20enabling%20both%20php%20and%20installing%20mysql%20is%20trivial%20on%20OSX%20compared%20even%20to%20linux%0D%0A1%20-%20enable%20php%20in%20apache%20%28basically%20edit%20the&amp;source=Vlad Alexa&#039;s Blog" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.vladalexa.com/2009/03/17/setting-up-osx-as-web-server/&amp;title=setting+up+osx+as+web+server" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=setting+up+osx+as+web+server+-+http://tinyurl.com/2brtfdj&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://blog.vladalexa.com/2009/03/17/setting-up-osx-as-web-server/&amp;title=setting+up+osx+as+web+server" rel="nofollow" class="external" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.vladalexa.com/2009/03/17/setting-up-osx-as-web-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
