We can get started by typing these commands:
sudo apt-get update
sudo apt-get install apache2
Since we are using a sudo command, these operations get executed with root privileges.
Open up the main configuration file with your text edit:
sudo nano /etc/apache2/apache2.conf
Edit the following line replace server_domain_or_Ip with your server domain or IP:
ServerName server_domain_or_IP
Next, check for syntax errors by typing:
sudo apache2ctl configtest
Since we added the global ServerName directive, all you should see is:
Output
Syntax OK
Restart Apache to implement your changes:
sudo systemctl restart apache2
Adjust the Firewall to Allow Web Traffic
If you look at the Apache Full profile, it should show that it enables traffic to ports 80 and 443:
sudo ufw allow in "Apache Full"
http://your_server_IP_address
sudo apt-get update
sudo apt-get install apache2
Since we are using a sudo command, these operations get executed with root privileges.
Open up the main configuration file with your text edit:
sudo nano /etc/apache2/apache2.conf
Edit the following line replace server_domain_or_Ip with your server domain or IP:
ServerName server_domain_or_IP
Next, check for syntax errors by typing:
sudo apache2ctl configtest
Since we added the global ServerName directive, all you should see is:
Output
Syntax OK
Restart Apache to implement your changes:
sudo systemctl restart apache2
Adjust the Firewall to Allow Web Traffic
If you look at the Apache Full profile, it should show that it enables traffic to ports 80 and 443:
sudo ufw allow in "Apache Full"
http://your_server_IP_address
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.