初代玄箱5箱目 〜 その3

ダイナミックDNSの自動更新

# vi /etc/crontab
23 * * * * root wget -q -O - 'http://free.ddo.jp/dnsupdate.php?dn=ドメイン&pw=パスワード'

apache2インストール

apache2.conf
# apt-get install apache2
念のため複製とってから編集
# vi /etc/apache2/apache2.conf

#Could not reliably determine the server's fully qualified domain nameというエラー対策
ServerName localhost

#iPhoneブラウズの邪魔になるので消す
ServerSignature Off

digest認証ファイルを作る
# a2enmod auth_digest
# htdigest -c /etc/apache2/htdigest realm ユーザー名

default
念のため複製とってから編集
中身はこんなかんじ(暫定版)
# vi /etc/apache2/sites-available/default

Listen 880
Listen 10880
NameVirtualHost *:80
NameVirtualHost *:880
NameVirtualHost *:10880

#家内LANからiPhoneで動画・音楽をブラウズする

  ServerName localhost
  DocumentRoot /mnt/share/www
  
    AllowOverride None
    Options All
    #家内LANからの接続のみ許可
    Order allow,deny
    Allow from 192.168.1
    #インデックス表示は非表示列を指定できます。長い名前も表示できるようにします。
    IndexOptions Charset=UTF-8 FancyIndexing FoldersFirst VersionSort HTMLTable NameWidth=* SuppressRules
    #IndexOptions SuppressLastModified
    IndexOptions SuppressDescription
    #スタイルシートで表示制御する場合
    IndexStyleSheet /include/style.css
    #ヘッダファイル差し替えの場合
    #IndexOptions SuppressHTMLPreamble
    #HeaderName /include/HEADER.html
    #非表示ファイル
    IndexIgnore *.bak *~
  


#外からの接続はdigest認証を要求する、LANは認証なし
#今のところ、WOLするcgipingするcgiを置く予定

  ServerName localhost
  DocumentRoot /mnt/share/www2
  
    AllowOverride None
    Options All

    AuthType Digest
    AuthName realm
#    AuthDigestFile /etc/apache2/htdigest #下はapache2.2用
    AuthUserFile /etc/apache2/htdigest
    Require valid-user

    Order allow,deny
    Allow from 192.168.1
    satisfy any




#実験的に公開する

  ServerName localhost
  DocumentRoot /mnt/share/www3
  
  



/include/style.css

 *{
  padding: 0px;
  margin: 0px;
  font-family: Helvetica;
  
}

a{
	text-decoration : none ;
}

h1{
  height: 33px;
  text-shadow: 3px 3px #5E6773;
  overflow: hidden;
  font-size : 200% ;
  text-align: center;
  padding-top: 12px;
  background: #7f93ad;
  color: white;
  white-space: nowrap;
}

table{
	width:100%;
	border-collapse:collapse;
}

th{
	padding-top : 12px ;
	font-size : 200% ;
	border-bottom : solid 1px #888888 ;
}

td{
	padding-top : 12px ;
	font-size : 200% ;
	border-bottom : solid 1px #888888 ;
}

ここまでの作業でこんなイメージ