LoginSignup
0
0

More than 3 years have passed since last update.

【俺得】Apache基本コマンド①

Last updated at Posted at 2019-09-17

apache の基本

ディレクトリ構成

/etc/httpd/・・・サーバルート
/etc/httpd/conf・・・各種configディレクトリ
/etc/httpd/conf.d/・・・外部configディレクトリ
/etc/httpd/logs/・・・ログディレクトリ
/var/www/html/・・・ドキュメントルート(静的コンテンツディレクトリ)

初期設定ファイル

httpd.conf

■場所
/etc/httpd/conf/

■内容(抜粋)

Listen 80

⇒リッスンポートの指定

IncludeOptional conf.d/*.conf

⇒外部configの読み込み

welcome.conf

■場所
/etc/httpd/conf.d/

■内容

<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /.noindex.html
</LocationMatch>

http://xxx/ or http://xxx// or http://xxx///の場合
 ディレクトリインデックス画面を無効果(ブラウザへディレクトリ構成表示しない) 
 httpステータス 403になる為、/.noindex.htmlを表示する

<Directory /usr/share/httpd/noindex>
    AllowOverride None
    Require all granted
</Directory>

⇒/usr/share/httpd/noindexに対して
 noindex以下で個別の設定変更することはできません。
 /usr/share/httpd/noindexに対して全アクセス拒否
 
※参考URL
http://www.hizlab.net/app/apache.html

Alias /.noindex.html /usr/share/httpd/noindex/index.html

⇒/.noindex.htmlを/usr/share/httpd/noindex/index.htmlへと読み替える。

0
0
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
0
0