<?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>Phine Solutions &#187; apache</title>
	<atom:link href="http://www.phinesolutions.com/topics/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://www.phinesolutions.com</link>
	<description>A web log for web work</description>
	<lastBuildDate>Wed, 30 Jun 2010 16:23:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting up an alias in Apache</title>
		<link>http://www.phinesolutions.com/setting-up-an-alias-in-apache.html</link>
		<comments>http://www.phinesolutions.com/setting-up-an-alias-in-apache.html#comments</comments>
		<pubDate>Wed, 01 Oct 2008 20:07:24 +0000</pubDate>
		<dc:creator>1.618</dc:creator>
				<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.phinesolutions.com/?p=164</guid>
		<description><![CDATA[Alias module in Apache http server provides an easy way to map a URL path to a local file directory. For example, the popular MySQL web access tool phpMyAdmin is often installed as a alias in the Apache web server. Usually a line of code like this will do the trick:
alias /phpMyAdmin &#8220;/my/directory/phpMyAdmin&#8221;
Recently I tried [...]]]></description>
			<content:encoded><![CDATA[<p>Alias module in Apache http server provides an easy way to map a URL path to a local file directory. For example, the popular MySQL web access tool phpMyAdmin is often installed as a alias in the Apache web server. Usually a line of code like this will do the trick:</p>
<p>alias /phpMyAdmin &#8220;/my/directory/phpMyAdmin&#8221;</p>
<p>Recently I tried to setup a new server in the same way but kept getting 403 forbidden (You don&#8217;t have permission to access /phpMyAdmin on this server) message from the web server. Thinking that this must have been some trivial issue like a typo, it turned out to be a long troubleshooting process. Finally I figured out the couple of things that needed to be fixed:</p>
<p>First, the directory access permission needs to be set up correctly.</p>
<p>The default directory access permission is usually set pretty strict. It looks like this:</p>
<blockquote><p>&lt;Directory /&gt;</p>
<p>    Options FollowSymLinks</p>
<p>    AllowOverride None</p>
<p>    Order deny,allow</p>
<p>    Deny from all</p>
<p>&lt;/Directory&gt;</p></blockquote>
<p>It provides good security but also prevents the access to the others. So we&#8217;ll have to re-configure the directory that is mapped to an alias (Same should be done for the virtual server as well). So adding this into the httpd.conf will make it better:</p>
<blockquote><p>&lt;Directory &#8220;/my/directory/phpMyAdmin&#8221;&gt;</p>
<p>    Options All -Indexes</p>
<p>    AllowOverride all</p>
<p>    Order allow,deny</p>
<p>    Allow from all</p>
<p>&lt;/Directory&gt;</p></blockquote>
<p>However, I was still getting the error: You don&#8217;t have permission to access /phpMyAdmin on this server, which was quite puzzling since I was pretty sure I was on the right track.</p>
<p>Now this time even the error message was the same it was a different cause. Since I disallowed file listing on the directory (-Indexes) Apache refused to server the URI &#8230;/phpMyAdmin. All I needed to do was to add index.php to the DirectoryIndex directive so Apache knows what to display when a directory name is requested. Of course &#8230;/phpMyAdmin/index.php would also work without the change.</p>
<p>A seemingly small problem caused me a lot of time to fix.</p>
<blockquote>
<div></div>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.phinesolutions.com/setting-up-an-alias-in-apache.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
