Apacheで仮想ホストを動かそう:いまさら聞けない!? Web系開発者のためのサーバ知識(3)(3/3 ページ) AllowOverrideと.htaccess 脱線ついでに、ディレクトリごとに設定を上書きする方法をもう1つ紹介しておきます。 <Directory "ディレクトリパス"> ~ </Directory>による設定は、httpd.confなどの設定ファイルに記述するため、Apacheの再起動が必要になります。また、管理者以外は通常は設定ファイルを編集できません。 そこで、Apacheでは.htaccessというファイルをディレクトリに設置することで、設定の一部を上書きできるようになっています。これはレンタルサーバなどでもよく利用されるおなじみの方法ですね。 .htaccessの記述は、基本的にhttpd.confと同じなのですが、.htaccessで設定可能な項目とそうでない