Which command checks whether the Apache service is running on a systemd-based Linux system?

sudo systemctl status apache2

What is the purpose of defining a virtual host in Apache?

The main purpose of defining a virtual host in Apache is to host multiple websites or applications on a single server (one Apache instance), each with its own domain name, configuration, or content.

What is the purpose of defining a virtual host in Apache?

The main purpose of defining a virtual host in Apache is to host multiple websites or applications on a single server (one Apache instance), each with its own domain name, configuration, or content.

What is the primary Apache configuration file called on most Linux systems?

/etc/httpd/conf/httpd.conf # On RHEL/CentOS/Amazon Linux

When is user data executed on the instance?

By default, user data is executed during the first boot of an EC2 instance — specifically at instance launch, when the OS first initializes.