Step 1: Install Apache and Allow in Firewall
sudo apt-get update
sudo apt-get install apache2
Step 2: Set Global ServerName to Suppress Syntax Warnings
Next, we will add a single line to the
/etc/apache2/apache2.conf file to suppress a warning message. While harmless, if you do not set ServerName globally, you will receive the following warning when checking your Apache configuration for syntax errors:sudo apache2ctl configtest
Output
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
Syntax OK
Open up the main configuration file with your text edit:sudo nano /etc/apache2/apache2.conf
Add below line or Find ServerName and uncomment it
ServerName server_domain_or_IP
Save and close the file when you are finished.Next, check for syntax errors by typing:
sudo apache2ctl configtest
Output
Syntax OK
No comments:
Post a Comment