blog/content/post/2009/07/18/2009-07-18-00001199.md

64 lines
1.7 KiB
Markdown

---
title: Ubuntuでユーザーディレクトリのフォルダをapacheで公開する方法
author: kazu634
date: 2009-07-18
url: /2009/07/18/_1298/
wordtwit_post_info:
- 'O:8:"stdClass":13:{s:6:"manual";b:0;s:11:"tweet_times";i:1;s:5:"delay";i:0;s:7:"enabled";i:1;s:10:"separation";s:2:"60";s:7:"version";s:3:"3.7";s:14:"tweet_template";b:0;s:6:"status";i:2;s:6:"result";a:0:{}s:13:"tweet_counter";i:2;s:13:"tweet_log_ids";a:1:{i:0;i:4717;}s:9:"hash_tags";a:0:{}s:8:"accounts";a:1:{i:0;s:7:"kazu634";}}'
categories:
- apache2
- ubuntu
---
<div class="section">
<p>
以下のようにします。
</p>
<h4>
モジュールのインストール
</h4>
<pre class="syntax-highlight">
$ sudo a2enmod userdir
</pre>
<h4>
設定ファイルの編集
</h4>
<p>
設定ファイルの編集を行います。
</p>
<pre class="syntax-highlight">
$ vi /etc/apache2/mods-enabled/userdir.conf
</pre>
<p>
編集後の設定ファイルの内容は次のようになります。
</p>
<pre class="syntax-highlight">
&#60;IfModule mod_userdir.c&#62;
UserDir public_html
UserDir disabled root
&#60;Directory /home/*/public_html&#62;
Options IncludesNoExec ExecCGI FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
&#60;/Directory&#62;
&#60;/IfModule&#62;
</pre>
<h4>
参考
</h4>
<ul>
<li>
<a href="http://d.hatena.ne.jp/Fiore/20080310/1205127955" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://d.hatena.ne.jp/Fiore/20080310/1205127955', 'ApacheでUserdirを使用できるようにする。 &#8211; そ、そんなことないんだから!');" target="_blank">ApacheでUserdirを使用できるようにする。 &#8211; そ、そんなことないんだから!</a>
</li>
</ul>
</div>