自宅の開発用LinuxをVine4.0へアップグレードして、Webサーバーが Apache1からApache2へ変わってました。
ついでに、 httpd.conf の設定を行ったのでそのメモ。
Vine3.xまでは Apache1.xが標準でした。
というわけで、 httpd.conf のパスも変更になってます。
Vine 3.x 系
$sudo vim /etc/httpd/conf/httpd.conf
Vine 4.x 系
$sudo vim /etc/apache2/conf/httpd.conf
httpd.confの編集
基本的に操作するところは数箇所ですが、自分の好みもあるので以下のように変更
(行数などはコメントの挿入などでずれているので、エディターから検索してください)
...
ServerAdmin 'ここに自分のメールアドレス' #開発用のサーバーなので無意味ですけど
...
DocumentRoot "/home/httpd/html" #Vine3.x系の頃のディレクトリ構造のままにしてます
...
<Directory "/home/httpd/html"> #DocumentRootの設定
Options Indexes Includes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from All
</Directory>
...
<IfModule mod_userdir.c> #ユーザーディレクトリの公開設定
UserDir enabled
UserDir public_html
</IfModule>
...
<Directory "/home/*/public_html"> #ユーザーディレクトリの設定
Options Indexes Includes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from All
</Directory>
...
AddHandler cgi-script .cgi #CGIの設定
...
#以下、公開ディレクトリとAlias設定
Alias /devel "/home/deve/" #/home/deve/ を /devel として公開
<Directory "/home/devel">
Options Indexes FollowSymLinks +ExecCGI Includes
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
12月 29 2006
特定のディレクトリをWeb公開する[ httpd.conf ]の設定
自宅の開発用LinuxをVine4.0へアップグレードして、Webサーバーが Apache1からApache2へ変わってました。
ついでに、 httpd.conf の設定を行ったのでそのメモ。
Vine3.xまでは Apache1.xが標準でした。
というわけで、 httpd.conf のパスも変更になってます。
Vine 3.x 系
Vine 4.x 系
httpd.confの編集
基本的に操作するところは数箇所ですが、自分の好みもあるので以下のように変更
(行数などはコメントの挿入などでずれているので、エディターから検索してください)
By KYO • Apache, Linux • Tags: apache, config