[root@Jaking12 httpd-2.4.39]# ls /usr/local/apache24/
bin build cgi-bin conf error htdocs icons include logs man manual modules
[root@Jaking12 httpd-2.4.39]# ls /usr/local/apache24/conf/
extra httpd.conf magic mime.types original
[root@Jaking12 httpd-2.4.39]# ls /usr/local/apache24/bin/
ab apxs dbmmanage envvars-std htcacheclean htdigest httpd logresolve
apachectl checkgid envvars fcgistarter htdbm htpasswd httxt2dbm rotatelogs
[root@Jaking12 httpd-2.4.39]# ll /usr/local/apache24/bin/apachectl
-rwxr-xr-x 1 root dip 3440 Mar 10 16:45 /usr/local/apache24/bin/apachectl
启动 apache2.4
[root@Jaking12 httpd-2.4.39]# /usr/local/apache24/bin/apachectl
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::250:56ff:fe2c:fe97%ens33. Set the 'ServerName' directive globally to suppress this message
这是一个提示,问题不大 (⊙o⊙)…
查看 apache2.4 相关信息
[root@Jaking12 httpd-2.4.39]# netstat -pantul | grep 80
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 807/sshd
tcp6 0 0 :::80 :::* LISTEN 35199/httpd
tcp6 0 0 :::22 :::* LISTEN 807/sshd
[root@Jaking12 httpd-2.4.39]# grep DocumentRoot /usr/local/apache24/conf/httpd.conf
# DocumentRoot: The directory out of which you will serve your
DocumentRoot "/usr/local/apache24/htdocs"
# access content that does not live under the DocumentRoot.
[root@Jaking12 httpd-2.4.39]# ls /usr/local/apache24/htdocs
index.html
[root@Jaking12 httpd-2.4.39]# cat /usr/local/apache24/htdocs/index.html
It works!
自定义首页内容
[root@Jaking12 httpd-2.4.39]# vim /usr/local/apache24/htdocs/index.html
It works!
Hello World!