最終更新: zaininnari 2010年01月10日(日) 00:34:13履歴
- Public_htmlにホストするドメインの領域を作成。
- 領域内には{各フォルダ}が作成されます。
- 公開フォルダはpublic_html/HOST名/public
mkdir -p var/www/public_html/test/{public,private,log,cgi-bin,backup}
- 「hostname」を適宜読み替え
sudo vi /etc/apache2/sites-available/hostname
- 以下を記述
<VirtualHost *:80> # Admin email, Server Name (domain name) and any aliases #ServerAdmin info@example.com ServerName example.com #ServerAlias www.example.com # Index file and Document Root (where the public files are located) DirectoryIndex index.php index.html DocumentRoot /home/username/public_html/example/public # Custom log file locations LogLevel warn ErrorLog /home/username/public_html/example/log/error.log CustomLog /home/username/public_html/example/log/access.log combined </VirtualHost>
- VirtualHostを有効にする
cd /etc/apache2/sites-available sudo a2ensite test
- 再起動
sudo /etc/init.d/apache2 reload
- aclの導入が必要
- www-data:Apacheユーザ
- <ユーザー名>:ユーザー名
sudo setfacl -m u:www-data:rwx,g:www-data:rwx /home/<ユーザー名>/public_html/
- インクルードされている.confファイル内で、「NameVirtualHost」が干渉している可能性がある
[notice] Digest: generating secret for digest authentication ... [notice] Digest: done
- mod_auth_digest.so(ダイジェスト認証のモジュール)を組み込んでいるとapache起動時に表示される
- ダイジェスト認証とは
最新コメント