Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1
Check   the Apache  site    for security    reports.    Browse  to
http://httpd.apache.org/security_report.html for links to security
vulnerabilities for Apache 2.0, 2.2, and 2.4. Subscribe to a support list or
browse through up-to-date archives of all Apache mailing lists at
http://httpd.apache.org/mail/(for various articles or
http://httpd.apache.org/lists.html for comprehensive and organized archives.
CAUTION
Be wary of installing experimental packages and never install them on
production servers (that is, servers used in “real life”). Very carefully test
packages beforehand on a host that is not connected to a network!

For more information about installing software from the Ubuntu repositories,
see Chapter 9, “Managing Software.”


Starting and Stopping Apache


At this point, you should have installed your Apache server with its default
configuration. Ubuntu provides a default home page at
/var/www/html/index.html as a test.


You can start Apache from the command line of a text-based console or X
terminal window, and you must have root permission to do so. How you do so
depends on the release version of Ubuntu that you are running. For Ubuntu
16.04 and later, you use systemd commands. For earlier Ubuntu releases
like 12.04 and 14.04 that used Upstart, you use Upstart commands. Some
prefer to use apache2ctl commands, which work across most
distributions. Table 25.1 compares the commands.


Table 25.1 Comparing commands used in systemd, Upstart, and apache2ctl


Actionsystemd Upstart apache2ctl

Start sudo  systemctl   start
apache2.service

sudo    start
apache2

sudo
apache2ctl
start

Stop sudo   systemctl   stop
apache2.service

sudo    stop
apache2

sudo
apache2ctl
stop

Restartsudo systemctl
restart

sudo
restart

sudo
apache2ctl
Free download pdf