Results 1 to 4 of 4

Thread: Apache stop option missing

Hybrid View

  1. #1
    Join Date
    Jan 2014
    Beans
    4

    Apache stop option missing

    How do I stop my local apache server? The following 2 commands gives only 3 options -- `restart`, `start` and `status`

    Code:
    /etc/init.d/apache2
    service apache2

  2. #2
    Join Date
    Jul 2010
    Location
    Michigan, USA
    Beans
    2,120
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Apache stop option missing

    You are missing a bunch of options. Here is what should show up on a default install for those two commands.
    Code:
    # /etc/init.d/apache2 
     * Usage: /etc/init.d/apache2 {start|stop|graceful-stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean|status}
    # service apache2 
     * Usage: /etc/init.d/apache2 {start|stop|graceful-stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean|status}
    I would probably purge your apache install and re-install.
    Code:
    sudo apt-get remove --purge apache2 -y
    sudo apt-get autoremove
    sudo apt-get install apache2

  3. #3
    Join Date
    Mar 2010
    Location
    Metro-ATL; PM free zone.
    Beans
    Hidden!
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Apache stop option missing

    Are you certain that apache2 is running? That could explain why the stop option is not listed?

    Trysudo stop apache2
    Also,
    sudo /etc/init.d/apache2 stop
    and
    sudo service apache2 stop
    should work, provided apache2 is actually the init.d cmd/service name.

    I don't have apache on any boxes - switched to nginx a few years ago - so I can't tell you the exact command.

    Of course, there was a new version of apache with 13.10 ... so the name of the service may have changed ... perhaps apache24? I don't know. I would use tab cmd completion to find it.

    If you tell which Ubuntu release or which apache package is loaded ... dpkg -l|grep apache will tell us that ... then someone can probably provide the exact cmd needed with certainty.

  4. #4
    Join Date
    Sep 2013
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Apache stop option missing

    To stop, sudo service apache2 stop

    To start, sudo service apache2 start

    To stop then start, sudo service apache2 restart

    Good luck,
    Chris
    "Ignorance is short-lived, and knowledge is forever."


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •