apache設定

Last-modified: 2013-10-02 (水) 16:32:38

参考

手順

  1. change directory
    cd /usr/local/apache2/conf
  1. edit httpd.conf
    sudo vi httpd.conf
76 User daemon
77 Group daemon
   ↓
76 User apache
77 Group apache
99 ServerAdmin you@example.com
 ↓
99 ServerAdmin root@localhost
108 ServerName testGroupOffice
  1. confirm httpd.conf
    /usr/local/apache2/bin/apachectl configtest
    Syntax OK
  1. start apache2
    sudo /usr/local/apache2/bin/apachectl start
  1. confirm apache2 starting
    ps -ef | grep apache
    root      3090     1  0 19:11 ?        00:00:00 /usr/local/apache/bin/httpd -k start
    apache    3091  3090  0 19:11 ?        00:00:00 /usr/local/apache/bin/httpd -k start
    apache    3092  3090  0 19:11 ?        00:00:00 /usr/local/apache/bin/httpd -k start
    apache    3093  3090  0 19:11 ?        00:00:00 /usr/local/apache/bin/httpd -k start
    apache    3094  3090  0 19:11 ?        00:00:00 /usr/local/apache/bin/httpd -k start
  1. stop apache2
    sudo /usr/local/apache2/bin/apachectl stop