はじめての自宅サーバ構築 - Fedora/CentOS -
Last Update 2018/05/30
[ 更新履歴 ] [ サイト マップ ] [ 質問掲示板 ] [ 雑談掲示板 ] [ リンク ]
トップ >> 質問掲示板

 このスレッドはクローズされています。記事の閲覧のみとなります。

 チルダ付きホームページが表示されない
日時: 2010/03/23 22:24
名前: ハフナー

1.不明点・障害内容:チルダ付きホームページが表示できない
2.ログの有無   :
  (有:その内容) :
3.Distribution  :fedora
      Version :12
4.Service Name  :httpd
      Version :2.2
5.ネットワーク構成:

http://kajuhome.com/tips/tips_03_002.shtmlにしたがって、設定を行いました。設定項目の記述が変わっているので、以下のようにしました。

<IfModule mod_userdir.c>
  #
  # UserDir is disabled by default since it can confirm the presence
  # of a username on the system (depending on home directory
  # permissions).
  #
  # UserDir disable

  #
  # To enable requests to /~user/ to serve the user's public_html
  # directory, remove the "UserDir disable" line above, and uncomment
  # the following line instead:
  # 
  UserDir public_html
</IfModule>

<Directory /home/*/public_html>
  AllowOverride All
  Options Includes ExecCGI FollowSymlinks
  <Limit GET POST OPTIONS>
    Order allow,deny
    Allow from all
  </Limit>
#  <LimitExcept GET POST OPTIONS>
#    Order deny,allow
#    Deny from all
#  </LimitExcept>
</Directory>

さらにユーザーディレクトリを作りました。
home
 |
 +---linux
    |
    +---public_html
      (index.html)
と、これでいいと思うのですが、ブラウザからhttp://123.456.789.012/~linuxとすると「NotFound」(エラーコードなし)になってしまいます。あと何か設定が不足しているのでしょうか? ちなみにhttp://123.456.789.012/index.htmlは正常に表示されますし、バーチャルホストの方もhttp://123.456.789.012/virtual/index.htmlも正しく表示されます
メンテ

Page:  [1] [2]

■ コンテンツ関連情報

 Re: チルダ付きホームページが表示されない ( No.1 )
日時: 2010/03/23 22:29
名前: stranger
参照: http://ja.528p.com/

httpdのuser apacheはlinuxに対してはotherになるので
/home/linuxのパーミッションをすくなくとも711以上に設定
メンテ
 Re: チルダ付きホームページが表示されない ( No.2 )
日時: 2010/03/23 23:27
名前: ハフナー

strangerさん、早速のお返事ありがとうございます。
------------------------------------------------------------------------------
 ※:一般ユーザであることに注意して下さい。(カレントパスも「/home/linux」です)
「public_html」パスを作成
$ mkdir public_html
パーミッション「other」が読み取れる様にする
$ chmod 701 /home/linux
実行権を付与する
$ chmod 755 /home/linux/public_html
------------------------------------------------------------------------------
この説明に従ってパーミッションの設定を行いました。今/home/linixのパーミッションを711にしてみましたが状況は変わりません。
-----------------------------------------------------------------------------
Not Found
The requested URL /~linux was not found on this server.
-----------------------------------------------------------------------------
となってしまいます。あとは何を調べたらよいでしょうか?
メンテ
 Re: チルダ付きホームページが表示されない ( No.3 )
日時: 2010/03/23 23:46
名前: ハフナー

>この説明に従ってパーミッションの設定を行いました。今/home/linixのパーミッションを711にしてみました
                           /home/linuxです。書き間違えました。 
メンテ
 Re: チルダ付きホームページが表示されない ( No.4 )
日時: 2010/03/24 06:37
名前: stranger
参照: http://ja.528p.com/

selinuxで制御されていませんか
メンテ
 Re: チルダ付きホームページが表示されない ( No.5 )
日時: 2010/03/24 07:16
名前: ハフナー

> selinuxで制御されていませんか

# vi /etc/selinux/config
SELINUX=disabled
SELINUXTYPE=targeted

このように無効化しています。

メンテ

Page:  [1] [2]

■ その他

ページ先頭へ

Copyright(©)2004-2018 First home server construction. All Right Reserved.