Complete the code to start the Nginx service using systemctl.
sudo systemctl [1] nginxTo start the Nginx service, use systemctl start nginx.
Complete the code to reload Nginx configuration without stopping the service.
sudo systemctl [1] nginxUse systemctl reload nginx to apply config changes without downtime.
Fix the error in the Nginx configuration test command.
sudo nginx -t [1]The -t option tests the config. Optionally, -c specifies the config file.
Fill both blanks to create a basic Nginx server block listening on port 80 and serving files from /var/www/html.
server {
listen [1];
root [2];
}Port 80 is default for HTTP. The root directory is usually /var/www/html for web files.
Fill all three blanks to write an Apache command that enables the rewrite module, restarts Apache, and checks its status.
sudo a2enmod [1] && sudo systemctl [2] apache2 && sudo systemctl [3] apache2
The rewrite module is enabled with a2enmod rewrite. Then Apache is restarted and its status checked.