[研究] Apache httpd Web Server 2.4.x 安裝、啟動 (Ubuntu 18.04 x64)
2018-07-27
john@ubuntu1804:~$
sudo apt-get install apache2
[sudo] password for john:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
apache2-bin apache2-data apache2-utils libapr1 libaprutil1
libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0
Suggested packages:
apache2-doc apache2-suexec-pristine | apache2-suexec-custom
The following NEW packages will be installed:
apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1
libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0
0 upgraded, 9 newly installed, 0 to remove and 293 not upgraded.
Need to get 1712 kB of archives.
After this operation, 6913 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://tw.archive.ubuntu.com/ubuntu bionic/main amd64 libapr1 amd64 1.6.3-2 [90.9 kB]
Get:2 http://tw.archive.ubuntu.com/ubuntu bionic/main amd64 libaprutil1 amd64 1.6.1-2 [84.4 kB]
Get:3 http://tw.archive.ubuntu.com/ubuntu bionic/main amd64 libaprutil1-dbd-sqlite3 amd64 1.6.1-2 [10.6 kB]
Get:4 http://tw.archive.ubuntu.com/ubuntu bionic/main amd64 libaprutil1-ldap amd64 1.6.1-2 [8764 B]
Get:5 http://tw.archive.ubuntu.com/ubuntu bionic/main amd64 liblua5.2-0 amd64 5.2.4-1.1build1 [108 kB]
Get:6 http://tw.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apache2-bin amd64 2.4.29-1ubuntu4.2 [1071 kB]
Get:7 http://tw.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apache2-utils amd64 2.4.29-1ubuntu4.2 [83.5 kB]
Get:8 http://tw.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apache2-data all 2.4.29-1ubuntu4.2 [160 kB]
Get:9 http://tw.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apache2 amd64 2.4.29-1ubuntu4.2 [95.1 kB]
Fetched 1712 kB in 1s (1935 kB/s)
Selecting previously unselected package libapr1:amd64.
(Reading database ... 128464 files and directories currently installed.)
Preparing to unpack .../0-libapr1_1.6.3-2_amd64.deb ...
Unpacking libapr1:amd64 (1.6.3-2) ...
Selecting previously unselected package libaprutil1:amd64.
Preparing to unpack .../1-libaprutil1_1.6.1-2_amd64.deb ...
Unpacking libaprutil1:amd64 (1.6.1-2) ...
Selecting previously unselected package libaprutil1-dbd-sqlite3:amd64.
Preparing to unpack .../2-libaprutil1-dbd-sqlite3_1.6.1-2_amd64.deb ...
Unpacking libaprutil1-dbd-sqlite3:amd64 (1.6.1-2) ...
Selecting previously unselected package libaprutil1-ldap:amd64.
Preparing to unpack .../3-libaprutil1-ldap_1.6.1-2_amd64.deb ...
Unpacking libaprutil1-ldap:amd64 (1.6.1-2) ...
Selecting previously unselected package liblua5.2-0:amd64.
Preparing to unpack .../4-liblua5.2-0_5.2.4-1.1build1_amd64.deb ...
Unpacking liblua5.2-0:amd64 (5.2.4-1.1build1) ...
Selecting previously unselected package apache2-bin.
Preparing to unpack .../5-apache2-bin_2.4.29-1ubuntu4.2_amd64.deb ...
Unpacking apache2-bin (2.4.29-1ubuntu4.2) ...
Selecting previously unselected package apache2-utils.
Preparing to unpack .../6-apache2-utils_2.4.29-1ubuntu4.2_amd64.deb ...
Unpacking apache2-utils (2.4.29-1ubuntu4.2) ...
Selecting previously unselected package apache2-data.
Preparing to unpack .../7-apache2-data_2.4.29-1ubuntu4.2_all.deb ...
Unpacking apache2-data (2.4.29-1ubuntu4.2) ...
Selecting previously unselected package apache2.
Preparing to unpack .../8-apache2_2.4.29-1ubuntu4.2_amd64.deb ...
Unpacking apache2 (2.4.29-1ubuntu4.2) ...
Setting up libapr1:amd64 (1.6.3-2) ...
Processing triggers for ufw (0.35-5) ...
Processing triggers for ureadahead (0.100.0-20) ...
Setting up apache2-data (2.4.29-1ubuntu4.2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up libaprutil1:amd64 (1.6.1-2) ...
Processing triggers for systemd (237-3ubuntu10) ...
Processing triggers for man-db (2.8.3-2) ...
Setting up liblua5.2-0:amd64 (5.2.4-1.1build1) ...
Setting up libaprutil1-ldap:amd64 (1.6.1-2) ...
Setting up libaprutil1-dbd-sqlite3:amd64 (1.6.1-2) ...
Setting up apache2-utils (2.4.29-1ubuntu4.2) ...
Setting up apache2-bin (2.4.29-1ubuntu4.2) ...
Setting up apache2 (2.4.29-1ubuntu4.2) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling module reqtimeout.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (237-3ubuntu10) ...
Processing triggers for ufw (0.35-5) ...
john@ubuntu1804:~$
john@ubuntu1804:~$
service apache2 restart
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'apache2.service'.
Authenticating as: John,,, (john)
Password:
==== AUTHENTICATION COMPLETE ===
john@ubuntu1804:~$
service apache2 status
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Fri 2018-07-27 04:07:00 CST; 6s ago
Process: 2701 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS
Process: 2706 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCE
Main PID: 2710 (apache2)
Tasks: 55 (limit: 4636)
CGroup: /system.slice/apache2.service
├─2710 /usr/sbin/apache2 -k start
├─2711 /usr/sbin/apache2 -k start
└─2712 /usr/sbin/apache2 -k start
七 27 04:07:00 ubuntu1804 systemd[1]: Starting The Apache HTTP Server...
七 27 04:07:00 ubuntu1804 apachectl[2706]: AH00558: apache2: Could not reliabl
七 27 04:07:00 ubuntu1804 systemd[1]: Started The Apache HTTP Server.
john@ubuntu1804:~$
設定檔案在 /etc/apache2 目錄
john@ubuntu1804:/etc/apache2$
ls -al
total 96
drwxr-xr-x 8 root root 4096 七 27 04:06 .
drwxr-xr-x 123 root root 12288 七 27 04:06 ..
-rw-r--r-- 1 root root 7224 六 8 05:10 apache2.conf
drwxr-xr-x 2 root root 4096 七 27 04:06 conf-available
drwxr-xr-x 2 root root 4096 七 27 04:06 conf-enabled
-rw-r--r-- 1 root root 1782 六 8 05:10 envvars
-rw-r--r-- 1 root root 31063 六 8 05:10 magic
drwxr-xr-x 2 root root 12288 七 27 04:06 mods-available
drwxr-xr-x 2 root root 4096 七 27 04:06 mods-enabled
-rw-r--r-- 1 root root 320 六 8 05:10 ports.conf
drwxr-xr-x 2 root root 4096 七 27 04:06 sites-available
drwxr-xr-x 2 root root 4096 七 27 04:06 sites-enabled
john@ubuntu1804:/etc/apache2$
john@ubuntu1804:/etc/apache2$
ls -alR
.:
total 96
drwxr-xr-x 8 root root 4096 七 27 04:06 .
drwxr-xr-x 123 root root 12288 七 27 04:06 ..
-rw-r--r-- 1 root root 7224 六 8 05:10 apache2.conf
drwxr-xr-x 2 root root 4096 七 27 04:06 conf-available
drwxr-xr-x 2 root root 4096 七 27 04:06 conf-enabled
-rw-r--r-- 1 root root 1782 六 8 05:10 envvars
-rw-r--r-- 1 root root 31063 六 8 05:10 magic
drwxr-xr-x 2 root root 12288 七 27 04:06 mods-available
drwxr-xr-x 2 root root 4096 七 27 04:06 mods-enabled
-rw-r--r-- 1 root root 320 六 8 05:10 ports.conf
drwxr-xr-x 2 root root 4096 七 27 04:06 sites-available
drwxr-xr-x 2 root root 4096 七 27 04:06 sites-enabled
./conf-available:
total 28
drwxr-xr-x 2 root root 4096 七 27 04:06 .
drwxr-xr-x 8 root root 4096 七 27 04:06 ..
-rw-r--r-- 1 root root 315 六 8 05:10 charset.conf
-rw-r--r-- 1 root root 3224 六 8 05:10 localized-error-pages.conf
-rw-r--r-- 1 root root 189 六 8 05:10 other-vhosts-access-log.conf
-rw-r--r-- 1 root root 2174 六 8 05:10 security.conf
-rw-r--r-- 1 root root 455 六 8 05:10 serve-cgi-bin.conf
./conf-enabled:
total 8
drwxr-xr-x 2 root root 4096 七 27 04:06 .
drwxr-xr-x 8 root root 4096 七 27 04:06 ..
lrwxrwxrwx 1 root root 30 七 27 04:06 charset.conf -> ../conf-available/charset.conf
lrwxrwxrwx 1 root root 44 七 27 04:06 localized-error-pages.conf -> ../conf-available/localized-error-pages.conf
lrwxrwxrwx 1 root root 46 七 27 04:06 other-vhosts-access-log.conf -> ../conf-available/other-vhosts-access-log.conf
lrwxrwxrwx 1 root root 31 七 27 04:06 security.conf -> ../conf-available/security.conf
lrwxrwxrwx 1 root root 36 七 27 04:06 serve-cgi-bin.conf -> ../conf-available/serve-cgi-bin.conf
./mods-available:
total 564
drwxr-xr-x 2 root root 12288 七 27 04:06 .
drwxr-xr-x 8 root root 4096 七 27 04:06 ..
-rw-r--r-- 1 root root 100 六 8 05:10 access_compat.load
-rw-r--r-- 1 root root 377 六 8 05:10 actions.conf
-rw-r--r-- 1 root root 66 六 8 05:10 actions.load
-rw-r--r-- 1 root root 843 六 8 05:10 alias.conf
-rw-r--r-- 1 root root 62 六 8 05:10 alias.load
-rw-r--r-- 1 root root 76 六 8 05:10 allowmethods.load
-rw-r--r-- 1 root root 76 六 8 05:10 asis.load
-rw-r--r-- 1 root root 94 六 8 05:10 auth_basic.load
-rw-r--r-- 1 root root 96 六 8 05:10 auth_digest.load
-rw-r--r-- 1 root root 100 六 8 05:10 auth_form.load
-rw-r--r-- 1 root root 72 六 8 05:10 authn_anon.load
-rw-r--r-- 1 root root 72 六 8 05:10 authn_core.load
-rw-r--r-- 1 root root 85 六 8 05:10 authn_dbd.load
-rw-r--r-- 1 root root 70 六 8 05:10 authn_dbm.load
-rw-r--r-- 1 root root 72 六 8 05:10 authn_file.load
-rw-r--r-- 1 root root 78 六 8 05:10 authn_socache.load
-rw-r--r-- 1 root root 74 六 8 05:10 authnz_fcgi.load
-rw-r--r-- 1 root root 90 六 8 05:10 authnz_ldap.load
-rw-r--r-- 1 root root 72 六 8 05:10 authz_core.load
-rw-r--r-- 1 root root 96 六 8 05:10 authz_dbd.load
-rw-r--r-- 1 root root 92 六 8 05:10 authz_dbm.load
-rw-r--r-- 1 root root 104 六 8 05:10 authz_groupfile.load
-rw-r--r-- 1 root root 94 六 8 05:10 authz_host.load
-rw-r--r-- 1 root root 74 六 8 05:10 authz_owner.load
-rw-r--r-- 1 root root 94 六 8 05:10 authz_user.load
-rw-r--r-- 1 root root 3374 六 8 05:10 autoindex.conf
-rw-r--r-- 1 root root 70 六 8 05:10 autoindex.load
-rw-r--r-- 1 root root 64 六 8 05:10 buffer.load
-rw-r--r-- 1 root root 889 六 8 05:10 cache_disk.conf
-rw-r--r-- 1 root root 89 六 8 05:10 cache_disk.load
-rw-r--r-- 1 root root 62 六 8 05:10 cache.load
-rw-r--r-- 1 root root 95 六 8 05:10 cache_socache.load
-rw-r--r-- 1 root root 70 六 8 05:10 cern_meta.load
-rw-r--r-- 1 root root 115 六 8 05:10 cgid.conf
-rw-r--r-- 1 root root 60 六 8 05:10 cgid.load
-rw-r--r-- 1 root root 58 六 8 05:10 cgi.load
-rw-r--r-- 1 root root 76 六 8 05:10 charset_lite.load
-rw-r--r-- 1 root root 60 六 8 05:10 data.load
-rw-r--r-- 1 root root 83 六 8 05:10 dav_fs.conf
-rw-r--r-- 1 root root 79 六 8 05:10 dav_fs.load
-rw-r--r-- 1 root root 58 六 8 05:10 dav.load
-rw-r--r-- 1 root root 68 六 8 05:10 dav_lock.load
-rw-r--r-- 1 root root 58 六 8 05:10 dbd.load
-rw-r--r-- 1 root root 395 六 8 05:10 deflate.conf
-rw-r--r-- 1 root root 84 六 8 05:10 deflate.load
-rw-r--r-- 1 root root 64 六 8 05:10 dialup.load
-rw-r--r-- 1 root root 157 六 8 05:10 dir.conf
-rw-r--r-- 1 root root 58 六 8 05:10 dir.load
-rw-r--r-- 1 root root 64 六 8 05:10 dump_io.load
-rw-r--r-- 1 root root 60 六 8 05:10 echo.load
-rw-r--r-- 1 root root 58 六 8 05:10 env.load
-rw-r--r-- 1 root root 66 六 8 05:10 expires.load
-rw-r--r-- 1 root root 72 六 8 05:10 ext_filter.load
-rw-r--r-- 1 root root 89 六 8 05:10 file_cache.load
-rw-r--r-- 1 root root 64 六 8 05:10 filter.load
-rw-r--r-- 1 root root 66 六 8 05:10 headers.load
-rw-r--r-- 1 root root 176 六 8 05:10 heartbeat.load
-rw-r--r-- 1 root root 182 六 8 05:10 heartmonitor.load
-rw-r--r-- 1 root root 62 六 8 05:10 http2.load
-rw-r--r-- 1 root root 62 六 8 05:10 ident.load
-rw-r--r-- 1 root root 68 六 8 05:10 imagemap.load
-rw-r--r-- 1 root root 82 六 8 05:10 include.load
-rw-r--r-- 1 root root 402 六 8 05:10 info.conf
-rw-r--r-- 1 root root 60 六 8 05:10 info.load
-rw-r--r-- 1 root root 116 六 8 05:10 lbmethod_bybusyness.load
-rw-r--r-- 1 root root 116 六 8 05:10 lbmethod_byrequests.load
-rw-r--r-- 1 root root 114 六 8 05:10 lbmethod_bytraffic.load
-rw-r--r-- 1 root root 114 六 8 05:10 lbmethod_heartbeat.load
-rw-r--r-- 1 root root 121 六 8 05:10 ldap.conf
-rw-r--r-- 1 root root 60 六 8 05:10 ldap.load
-rw-r--r-- 1 root root 70 六 8 05:10 log_debug.load
-rw-r--r-- 1 root root 76 六 8 05:10 log_forensic.load
-rw-r--r-- 1 root root 58 六 8 05:10 lua.load
-rw-r--r-- 1 root root 62 六 8 05:10 macro.load
-rw-r--r-- 1 root root 7676 六 8 05:10 mime.conf
-rw-r--r-- 1 root root 60 六 8 05:10 mime.load
-rw-r--r-- 1 root root 120 六 8 05:10 mime_magic.conf
-rw-r--r-- 1 root root 72 六 8 05:10 mime_magic.load
-rw-r--r-- 1 root root 668 六 8 05:10 mpm_event.conf
-rw-r--r-- 1 root root 106 六 8 05:10 mpm_event.load
-rw-r--r-- 1 root root 571 六 8 05:10 mpm_prefork.conf
-rw-r--r-- 1 root root 108 六 8 05:10 mpm_prefork.load
-rw-r--r-- 1 root root 836 六 8 05:10 mpm_worker.conf
-rw-r--r-- 1 root root 107 六 8 05:10 mpm_worker.load
-rw-r--r-- 1 root root 724 六 8 05:10 negotiation.conf
-rw-r--r-- 1 root root 74 六 8 05:10 negotiation.load
-rw-r--r-- 1 root root 87 六 8 05:10 proxy_ajp.load
-rw-r--r-- 1 root root 347 六 8 05:10 proxy_balancer.conf
-rw-r--r-- 1 root root 115 六 8 05:10 proxy_balancer.load
-rw-r--r-- 1 root root 822 六 8 05:10 proxy.conf
-rw-r--r-- 1 root root 95 六 8 05:10 proxy_connect.load
-rw-r--r-- 1 root root 95 六 8 05:10 proxy_express.load
-rw-r--r-- 1 root root 89 六 8 05:10 proxy_fcgi.load
-rw-r--r-- 1 root root 93 六 8 05:10 proxy_fdpass.load
-rw-r--r-- 1 root root 189 六 8 05:10 proxy_ftp.conf
-rw-r--r-- 1 root root 87 六 8 05:10 proxy_ftp.load
-rw-r--r-- 1 root root 93 六 8 05:10 proxy_hcheck.load
-rw-r--r-- 1 root root 2511 六 8 05:10 proxy_html.conf
-rw-r--r-- 1 root root 97 六 8 05:10 proxy_html.load
-rw-r--r-- 1 root root 97 六 8 05:10 proxy_http2.load
-rw-r--r-- 1 root root 89 六 8 05:10 proxy_http.load
-rw-r--r-- 1 root root 62 六 8 05:10 proxy.load
-rw-r--r-- 1 root root 89 六 8 05:10 proxy_scgi.load
-rw-r--r-- 1 root root 97 六 8 05:10 proxy_wstunnel.load
-rw-r--r-- 1 root root 85 六 8 05:10 ratelimit.load
-rw-r--r-- 1 root root 70 六 8 05:10 reflector.load
-rw-r--r-- 1 root root 68 六 8 05:10 remoteip.load
-rw-r--r-- 1 root root 1190 六 8 05:10 reqtimeout.conf
-rw-r--r-- 1 root root 72 六 8 05:10 reqtimeout.load
-rw-r--r-- 1 root root 66 六 8 05:10 request.load
-rw-r--r-- 1 root root 66 六 8 05:10 rewrite.load
-rw-r--r-- 1 root root 58 六 8 05:10 sed.load
-rw-r--r-- 1 root root 99 六 8 05:10 session_cookie.load
-rw-r--r-- 1 root root 99 六 8 05:10 session_crypto.load
-rw-r--r-- 1 root root 93 六 8 05:10 session_dbd.load
-rw-r--r-- 1 root root 66 六 8 05:10 session.load
-rw-r--r-- 1 root root 1280 六 8 05:10 setenvif.conf
-rw-r--r-- 1 root root 68 六 8 05:10 setenvif.load
-rw-r--r-- 1 root root 78 六 8 05:10 slotmem_plain.load
-rw-r--r-- 1 root root 74 六 8 05:10 slotmem_shm.load
-rw-r--r-- 1 root root 74 六 8 05:10 socache_dbm.load
-rw-r--r-- 1 root root 84 六 8 05:10 socache_memcache.load
-rw-r--r-- 1 root root 78 六 8 05:10 socache_shmcb.load
-rw-r--r-- 1 root root 66 六 8 05:10 speling.load
-rw-r--r-- 1 root root 3110 六 8 05:10 ssl.conf
-rw-r--r-- 1 root root 97 六 8 05:10 ssl.load
-rw-r--r-- 1 root root 749 六 8 05:10 status.conf
-rw-r--r-- 1 root root 64 六 8 05:10 status.load
-rw-r--r-- 1 root root 72 六 8 05:10 substitute.load
-rw-r--r-- 1 root root 64 六 8 05:10 suexec.load
-rw-r--r-- 1 root root 70 六 8 05:10 unique_id.load
-rw-r--r-- 1 root root 324 六 8 05:10 userdir.conf
-rw-r--r-- 1 root root 66 六 8 05:10 userdir.load
-rw-r--r-- 1 root root 70 六 8 05:10 usertrack.load
-rw-r--r-- 1 root root 74 六 8 05:10 vhost_alias.load
-rw-r--r-- 1 root root 66 六 8 05:10 xml2enc.load
./mods-enabled:
total 8
drwxr-xr-x 2 root root 4096 七 27 04:06 .
drwxr-xr-x 8 root root 4096 七 27 04:06 ..
lrwxrwxrwx 1 root root 36 七 27 04:06 access_compat.load -> ../mods-available/access_compat.load
lrwxrwxrwx 1 root root 28 七 27 04:06 alias.conf -> ../mods-available/alias.conf
lrwxrwxrwx 1 root root 28 七 27 04:06 alias.load -> ../mods-available/alias.load
lrwxrwxrwx 1 root root 33 七 27 04:06 auth_basic.load -> ../mods-available/auth_basic.load
lrwxrwxrwx 1 root root 33 七 27 04:06 authn_core.load -> ../mods-available/authn_core.load
lrwxrwxrwx 1 root root 33 七 27 04:06 authn_file.load -> ../mods-available/authn_file.load
lrwxrwxrwx 1 root root 33 七 27 04:06 authz_core.load -> ../mods-available/authz_core.load
lrwxrwxrwx 1 root root 33 七 27 04:06 authz_host.load -> ../mods-available/authz_host.load
lrwxrwxrwx 1 root root 33 七 27 04:06 authz_user.load -> ../mods-available/authz_user.load
lrwxrwxrwx 1 root root 32 七 27 04:06 autoindex.conf -> ../mods-available/autoindex.conf
lrwxrwxrwx 1 root root 32 七 27 04:06 autoindex.load -> ../mods-available/autoindex.load
lrwxrwxrwx 1 root root 30 七 27 04:06 deflate.conf -> ../mods-available/deflate.conf
lrwxrwxrwx 1 root root 30 七 27 04:06 deflate.load -> ../mods-available/deflate.load
lrwxrwxrwx 1 root root 26 七 27 04:06 dir.conf -> ../mods-available/dir.conf
lrwxrwxrwx 1 root root 26 七 27 04:06 dir.load -> ../mods-available/dir.load
lrwxrwxrwx 1 root root 26 七 27 04:06 env.load -> ../mods-available/env.load
lrwxrwxrwx 1 root root 29 七 27 04:06 filter.load -> ../mods-available/filter.load
lrwxrwxrwx 1 root root 27 七 27 04:06 mime.conf -> ../mods-available/mime.conf
lrwxrwxrwx 1 root root 27 七 27 04:06 mime.load -> ../mods-available/mime.load
lrwxrwxrwx 1 root root 32 七 27 04:06 mpm_event.conf -> ../mods-available/mpm_event.conf
lrwxrwxrwx 1 root root 32 七 27 04:06 mpm_event.load -> ../mods-available/mpm_event.load
lrwxrwxrwx 1 root root 34 七 27 04:06 negotiation.conf -> ../mods-available/negotiation.conf
lrwxrwxrwx 1 root root 34 七 27 04:06 negotiation.load -> ../mods-available/negotiation.load
lrwxrwxrwx 1 root root 33 七 27 04:06 reqtimeout.conf -> ../mods-available/reqtimeout.conf
lrwxrwxrwx 1 root root 33 七 27 04:06 reqtimeout.load -> ../mods-available/reqtimeout.load
lrwxrwxrwx 1 root root 31 七 27 04:06 setenvif.conf -> ../mods-available/setenvif.conf
lrwxrwxrwx 1 root root 31 七 27 04:06 setenvif.load -> ../mods-available/setenvif.load
lrwxrwxrwx 1 root root 29 七 27 04:06 status.conf -> ../mods-available/status.conf
lrwxrwxrwx 1 root root 29 七 27 04:06 status.load -> ../mods-available/status.load
./sites-available:
total 20
drwxr-xr-x 2 root root 4096 七 27 04:06 .
drwxr-xr-x 8 root root 4096 七 27 04:06 ..
-rw-r--r-- 1 root root 1332 六 8 05:10 000-default.conf
-rw-r--r-- 1 root root 6338 六 8 05:10 default-ssl.conf
./sites-enabled:
total 8
drwxr-xr-x 2 root root 4096 七 27 04:06 .
drwxr-xr-x 8 root root 4096 七 27 04:06 ..
lrwxrwxrwx 1 root root 35 七 27 04:06 000-default.conf -> ../sites-available/000-default.conf
john@ubuntu1804:/etc/apache2$
**********
關於 Apache Web Server 的設定檔案
Ubuntu 18.04 用 apt-get 安裝
設定檔案在 /etc/apache2 目錄
john@ubuntu1804:/etc/apache2$ ls -al
total 96
drwxr-xr-x 8 root root 4096 七 27 04:06 .
drwxr-xr-x 123 root root 12288 七 27 04:06 ..
-rw-r--r-- 1 root root 7224 六 8 05:10 apache2.conf
drwxr-xr-x 2 root root 4096 七 27 04:06 conf-available
drwxr-xr-x 2 root root 4096 七 27 04:06 conf-enabled
-rw-r--r-- 1 root root 1782 六 8 05:10 envvars
-rw-r--r-- 1 root root 31063 六 8 05:10 magic
drwxr-xr-x 2 root root 12288 七 27 04:06 mods-available
drwxr-xr-x 2 root root 4096 七 27 04:06 mods-enabled
-rw-r--r-- 1 root root 320 六 8 05:10 ports.conf
drwxr-xr-x 2 root root 4096 七 27 04:06 sites-available
drwxr-xr-x 2 root root 4096 七 27 04:06 sites-enabled
john@ubuntu1804:/etc/apache2$
CentOS 7.5 用 yum 安裝 apache httpd
[root@localhost ~]# httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built: Jun 27 2018 13:48:59
[root@localhost ~]#
設定檔案目錄在 /etc/httpd 目錄
主要設定檔是 /etc/httpd/conf/httpd.conf
CentOS 7.5 用 apache 的 httpd-2.4.34.tar.gz 安裝
/usr/local/apache2/conf/httpd.conf
設定檔案在
/usr/local/apache2/conf/httpd.conf
[root@localhost conf]# pwd
/usr/local/apache2/conf
[root@localhost conf]# ls -al
total 100
drwxr-xr-x. 4 root root 84 Jul 27 03:31 .
drwxr-xr-x. 15 root root 175 Jul 27 03:31 ..
drwxr-xr-x. 2 root root 4096 Jul 27 03:31 extra
-rw-r--r--. 1 root root 18282 Jul 27 03:31 httpd.conf
-rw-r--r--. 1 root root 13077 Jul 27 03:31 magic
-rw-r--r--. 1 root root 60847 Jul 27 03:31 mime.types
drwxr-xr-x. 3 root root 37 Jul 27 03:31 original
[root@localhost conf]#
(完)