AC-5

某SEの雑記帳

rootディレクトリで作成して移動したディレクトリがブラウザから表示できない

   

PostfixAdminをインストールをしていてはまったので・・・
未解決ですが暫定対応として載せておきます。

rootディレクトリにwgetでPostfixAdminをダウンロードして、解凍してから/var/www/html/postfixadminとして移動させました。
手順としては下記のようになります。

[root@test]# cd ~←rootディレクトリに移動
[root@test ~]#  wget http://downloads.sourceforge.net/project/postfixadmin/postfixadmin/postfixadmin-2.92/postfixadmin-2.92.tar.gz←wgetでPostfixAdminをダウンロード
[root@test ~]#  tar zxvf postfixadmin-2.92.tar.gz←PostfixAdminを解凍
[root@test ~]#  mv postfixadmin-2.92 /var/www/html/postfixadmin←ディレクトリ名をpostfixadminにリネームして、htmlディレクトリに移動

このような手順で、今回で言えばhttp://ドメイン名/postfixadminでアクセスできたような気がするのですが、今回は403エラー forbiddenになってしまってアクセスできませんでした。
AWS EC2を触ったのが、今回は初めてだったので、EC2特有の問題なのか、今までたまたまできていただけなのか、まだ調べきれていませんが、
403なので、アクセスはできているけれども権限の問題で弾かれているようです。

更に、そのディレクトリ(postfixadmin)の中に新規で、

[root@test postfixadmin]# vi index.html←index.htmlを作成

して、http://ドメイン名/postfixadmin/index.htmlにアクセスしても403エラーになってしまいます。

chmodやchownを使って権限の変更やパーミッションの変更も何度もやってみましたが結局改善できませんでした。

暫定解決方法

rootディレクトリでなく、直接htmlディレクトリにダウンロードして解凍したところ、あっさりとアクセスできました。

[root@test]# cd /var/www/html←htmlディレクトリに移動
[root@test html]#  wget http://downloads.sourceforge.net/project/postfixadmin/postfixadmin/postfixadmin-2.92/postfixadmin-2.92.tar.gz←wgetでPostfixAdminをダウンロード
[root@test html]#  tar zxvf postfixadmin-2.92.tar.gz←PostfixAdminを解凍
[root@test html]#  mv postfixadmin-2.92 postfixadmin←ディレクトリ名をpostfixadminにリネーム
[root@test html]#  rm -rf postfixadmin-2.92.tar.gz←ダウンロードしたファイルを削除

また引き続き調べてみます。

 - AWS, Linux