1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Apache起動で一部の画像が表示されない

Last updated at Posted at 2016-03-25

【参考サイト】
Apacheを使ってローカルサーバーを構築し、
いざ、ブラウザに「http://localhost/ (localhost) 」とうちこみ
表示させてみたが。

パスはあっているのに、一部画像が表示されない!!!
images_not_found.png
↑こんな感じ!

ターミナルで、該当の画像が格納されているimagesファイルに移動(cd)し、
「 ll 」 コマンドで、ファイルのパーミッション(アクセス権)を確認すると、
「 ll 」は、「ls -l」に相当するコマンドです。

たしかに、ばらばらな様子。。
(-rw-r-----とか、調べましたが、ちょっとわからないので、割愛します。。)
apache_01.png

そこで、以下のコマンドを打ちました
chmod 644 ./*

再度、「 ll ( ls -l) 」 コマンドを叩くと、
綺麗に(rw-r--r--)統一されました

追記: パーミッションの説明( 左(rw-)→自分、 真ん中(r--)グループに対する権限 右(r--)自分でもなく、グルーブにもいないユーザー
            r=読み w=書き x=実行

644の数字については、以下の記事をご確認ください
普通の HTML ファイルは 644 にする

再度、localhostを確認。

ちゃんと画像が表示されました〜!!!!!!!!!!!!!!

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?