

He wrote more than 7k+ posts and helped numerous readers to master IT topics. Vivek Gite is the founder of nixCraft, the oldest running blog about Linux and open source. To gracefully reload Apache 2 on Ubuntu, type: $ sudo restart apache2 Method #5: apache2ctl command examplesĪpache2ctl is Apache HTTP server control interface command, which can be used to stop or start web server under any Linux distribution or UNIX. To gracefully reload Apache 2 on Ubuntu, run: The following commands only works with certian version of Ubuntu such as Ubuntu Linux LTS 12.04 and 14.04.

$ sudo service apache2 reload Method #4: upstart command examples $ sudo /etc/init.d/apache2 stop Method #3: service command examples $ sudo /etc/init.d/apache2 restart Task: Stop Apache 2 Server $ sudo /etc/init.d/apache2 start Task: Restart Apache 2 Server You need to login as root user or use the sudo command to control Apache web-server. To find out whether Apache 2 running or not, enter:įig.01: Ubuntu Linux systemctl start/stop/restart Apache server (systemd) Method #2: /etc/init.d/apache2 command examples To status of start/restart/stop operation, enter: To restart Apache 2 on Ubuntu Linux LTS 16.04 LTS or the latest systemd based Ubuntu Linux, type: To stop Apache 2 on Ubuntu Linux LTS 16.04 LTS or the latest systemd based Ubuntu Linux, type: To start Apache 2 on Ubuntu Linux LTS 16.04 LTS or the latest systemd based Ubuntu Linux, type: apache2ctl command – This method should work on all Linux and Unix like operating systems.upstart command – Only works on certain version of Ubuntu.service command – This command work in most Linux distributions including Debian and Ubuntu./etc/init.d/apache2 – A sys v init style script to start / stop / restart the Apache2 service under Debian or Ubuntu Linux.

