go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  Step 4: Manage your Apache Web Server
 
Subject: Step 4: Manage your Apache Web Server
Author: Linux
In response to: Step 3: Adjust Firewall -- optional
Posted on: 11/01/2017 08:50:29 PM


Basic commands

$ sudo systemctl stop apache2    == /etc/init.d/apache2 stop
$ sudo systemctl start apache2   == /etc/init.d/apache2 start
$ sudo systemctl restart apache2 == /etc/init.d/apache2 restart
$ sudo systemctl reload apache2  -- soft-restart after config change without dropping connections


By default, the Apache web server can survive the machine reboot. That means whenever the machine starts the Apache web server is up and running. If you do not want this default behavior, you can disable it by
$ sudo systemctl disable apache2

Later on, you can always turn it back by:
$ sudo systemctl enable apache2


 

> On 11/01/2017 08:49:31 PM Linux wrote:


By defaut, the Firewall is inatcive and hence the Apache web server can be accessed from outside.
$ sudo ufw status
Status: inactive


If the firewall is actived. You must instruct your firewall to allow Apache web service to be accessible.

We can first list the ufw application profiles by:
$ sudo ufw app list
Available applications:
  Apache
  Apache Full
  Apache Secure
  OpenSSH


Then allow 'Apache Full'
$ sudo ufw allow 'Apache Full'


Now you should see:
$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
Apache Full                ALLOW       Anywhere
OpenSSH                    ALLOW       Anywhere
Apache Full (v6)           ALLOW       Anywhere (v6)
OpenSSH (v6)               ALLOW       Anywhere (v6)





References:

 


 
Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.