Security in CPS/Networking

Install apache2 & check MPM on ubuntu

mjune.kim 2019. 8. 28. 09:29

1. Install apache server

$> sudo apt-get install apache2

2. Run apache server

$> sudo service apache2 start/restart/stop

3. Check apache server

$> systemctl status apache2

4. Check wheither Multi-Processing Module  is loading.

1
2
@ubuntu:/etc/apache2$ apache2 -| grep MPM
Server MPM:     event

5. Check apache status

1
2
3
4
5
6
7
8
9
10
11
12
13
14
@ubuntu:/etc/apache2$ apache2 -S
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:80                   127.0.1.1 (/etc/apache2/sites-enabled/000-default.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/run/apache2/" mechanism=default 
Mutex watchdog-callback: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter

 

[Troubleshooting]

1. ${APACHE_RUN_DIR} is not defined

1
2
3
4
@ubuntu:/etc/apache2$ apache2 -| grep MPM
[Wed Aug 28 10:12:45.645861 2019] [core:warn] [pid 94957] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
Server MPM:
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter

[solved]

1
2
@ubuntu:/etc/apache2$ source /etc/apache2/envvars 
@ubuntu:/etc/apache2$ apache2 -S