2007 Dec 4th
これまで Python のマニュアルなどは、
/Users/mits/Sites
の下に置いておいてそこを参照していたのですが、 Leopard に変えてから Forbidden と言われて http://localhost/~mits/ にアクセスできなくなってしまいました。 Apache のバージョンを見てみると
macmini:~ mits$ apachectl -V
Server version: Apache/2.2.6 (Unix)
Server built:   Sep 23 2007 18:07:19
Server's Module Magic Number: 20051115:5
Server loaded:  APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_FLOCK_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/usr"
 -D SUEXEC_BIN="/usr/bin/suexec"
 -D DEFAULT_PIDLOG="/private/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/private/var/run/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/private/etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="/private/etc/apache2/httpd.conf"
と、 2.2.6 になっています。 UserDir へのアクセスの設定がなんだかうまくいっていないのはアップデートインストールしたからかどうかはわかりませんが、これだと困るので以下のようにしました。
/etc/apache2/httpd.conf
を見てみると、 UserDir に関する箇所は
Include /private/etc/apache2/extra/httpd-userdir.conf
とあります。なので続いて
/etc/apache2/extra/httpd-userdir.conf
を見てみると
# Settings for user home directories
#
# Required module: mod_userdir

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.  Note that you must also set
# the default access control for these directories, as in the example below.
#
UserDir Sites

#
# Users might not be in /Users/*/Sites, so use user-specific config files.
#
Include /private/etc/apache2/users/*.conf
とあります。 ユーザごとの設定をすることもなかろうから、この箇所をコメントアウトして、/Users/*/Sites の設定を入れて
#Include /private/etc/apache2/users/*.conf

<Directory /Users/*/Sites>
    Options FollowSymLinks
    Allow from all
</Directory>
としました。これでこれまでどおり http://localhost/~mits/ にアクセスできるようになりました。めでたしめでたし。

ってこんなことしなくても良いようにも思うんだけど...。
Posted by setomits at 09:46 | Comments: 2
Re: Web 共有 on Leopard
Thank you そーまっち、です。
LeopardにしてからはOSXでweb共有をしたことが無く、他のサイトでの対処方法も見たのですが、まるで動きませんでした。
しかし、これで稼働。
ありがとうございます!
Posted by den at 04:07 on 2009 Sep 20th
Re: Web 共有 on Leopard
こんにちは。
Web共有に興味を持ち、このHPヘたどり着きました。

SnowLeopardを使用しているのですが、
「http://locashost/~ユーザー名」とアドレスを打ち込むと、NotFoundが帰ってきてしまいます。

こちらのページに解決策が乗っているようなのですが、作業の仕方が分からずにいます。

記載してある修正方法なのですが、どのアプリケーションを使い修正するのか、分かりやすく教えていただけませんでしょうか?

お時間のあるときにアドバイスいただけると助かります。

よろしくお願い致します。
Posted by DEN at 14:29 on 2009 Oct 24th
Leave a comment
Required fields are marked with *
search
calendar
Mar 2010
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
28293031   
archives
photos on flickr
www.flickr.com
bookmarks on delicious