参考
手順
- change directory
cd /usr/local/apache2/conf
- 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
- confirm httpd.conf
/usr/local/apache2/bin/apachectl configtest
Syntax OK
- start apache2
sudo /usr/local/apache2/bin/apachectl start
- 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
- stop apache2
sudo /usr/local/apache2/bin/apachectl stop