*Apache 2.2.6_1 のインストール [#xe1b8e63]
#contents
http://httpd.apache.org/docs/2.2/ja/

# cd /usr/ports/www/apache22
# make
#ref(apache.jpg)
# make install

 Installing configuration files
 mkdir /usr/local/etc/apache22
 mkdir /usr/local/etc/apache22/extra
 mkdir /usr/local/share/examples/apache22
 mkdir /usr/local/share/examples/apache22/extra
 Installing HTML documents
 mkdir /usr/local/www/apache22
 mkdir /usr/local/www/apache22/data
 Installing error documents
 mkdir /usr/local/www/apache22/error
 Installing icons
 mkdir /usr/local/www/apache22/icons
 Installing CGIs
 mkdir /usr/local/www/apache22/cgi-bin
 Installing header files
 mkdir /usr/local/include/apache22
 Installing build system files
 mkdir /usr/local/share/apache22
 mkdir /usr/local/share/apache22/build
 Installing man pages and online manual
 mkdir /usr/local/share/doc/apache22
 To run apache www server from startup, add apache22_enable="YES"
 in your /etc/rc.conf. Extra options can be found in startup script.
 ===> Installing rc.d startup script(s)
 ===>   Compressing manual pages for apache-2.2.6_1
 ===>   Running ldconfig
 /sbin/ldconfig -m /usr/local/lib
 ===>   Registering installation for apache-2.2.6_1
 ===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
 /usr/local/lib/libapr-1.so.2
 
      This port has installed the following startup scripts which may cause
      these network services to be started at boot time.
 /usr/local/etc/rc.d/apache22
 /usr/local/etc/rc.d/htcacheclean
 
      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.
 
      For more information, and contact details about the security
      status of this software, see the following webpage:
 http://httpd.apache.org/

 #vi /etc/rc.conf
 #apache22_enable="YES"

 # apachectl start
 [Mon Sep 24 06:32:15 2007] [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter
 # apachectl start
 httpd (pid 82101) already running

#ref(itworks.jpg)
**/usr/local/etc/apache22/httpd.confの設定 [#uafb0fa3]
 # cp httpd.conf httpd.conf-dist
 
 ServerAdmin webmaster@thousand-winds.jp
 ServerName www.thousand-winds.jp:80
 
 # User home directories
 Include etc/apache22/extra/httpd-userdir.conf  <--uncomment

 
 # apachectl restart

**log の ローテーション [#k9566e30]
 /etc/newsyslog.conf
 /var/log/httpd-access.log		644  12    *    @01T05 Z  /var/run/httpd.pid
 /var/log/httpd-error.log		644  12    *    @01T06 Z  /var/run/httpd.pid

**Basic 認証 [#i34acb1d]
 % htpasswd -c /usr/home/tfc/.htpasswd tfc
 New password:
 Re-type new password:
 Adding password for user tfc

vi /usr/local/etc/apache22/extra/httpd-userdir.conf
 <Directory "/home/tfc/public_html/">
 AuthUserFile    /home/tfc/.htpasswd
 AuthGroupFile   /dev/null
 AuthName        "Please Enter Your Password"
 AuthType        Basic
 Require valid-user
 </Directory>

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS