How to Start/Restart/Stop the httpd Service


I have seen TONS of threads in forums asking how to restart the httpd service, and sometimes they only post one method. In this article I will tell you how to start it, restart it, or stop the httpd service with two different ways. You will need SSH root access.

Difficulty level: Easy

1. Establish a SSH connection and login as a root user.

The commands are as follows:

Start it:

/etc/init.d/httpd start
service httpd start

Restart it:

/etc/init.d/httpd restart
service httpd restart

Stop it:

/etc/init.d/httpd stop
service httpd stop

2. Execute any of the needed commands, if one does not work, try the other one.

And that is all there is to it! It will now start/restart/stop, depending on what you needed!

Any questions, comments, suggestions, problems, even just to say hi; please do not hesitate to contact me! 🙂

Best Regards,
Owner of

Looking for quality Linux Web Hosting? Try out Arvixe web hosting and you won’t be disappointed.

Tags: , , , , , , , , | Posted under Linux Server Admin, Linux Usability | RSS 2.0

Author Spotlight

Richi González

I started programming when I was 12. I'm a Developer and have been working with the Clip-Bucket script since it came out. I'm the Liaison between Arvixe and Clip-Bucket, so anything you need regarding Clip-Bucket or any particular computer-related subject you need, let me know so I can assist you.

4 Comments on How to Start/Restart/Stop the httpd Service

  1. Fabien says:

    when i try one of these commands it says permissions denied:
    /etc/init.d/httpd: line 15: ulimit: open files: cannot modify limit: Operation
    not permitted
    /etc/init.d/httpd: line 16: ulimit: open files: cannot modify limit: Operation
    not permitted
    /etc/init.d/httpd: line 17: ulimit: open files: cannot modify limit: Operation
    not permitted
    httpd: Could not open configuration file /usr/local/apache/conf/httpd.conf: Pe
    rmission denied

    .I m using Java SSH Login in arvixe cpanel to connect to the server. Is it because i m not a root user ? i ‘m using my cpanel username to connect and a public SSH key.

  2. Stephane says:

    Dear Richi,

    I searh for a shell script that’s restarts httpd service if it crash.
    How should I do that ?

    Like this pseudo code:

    if httpd don’t work {
    /etc/init.d/httpd restart

    Thanks in advance,


Leave a Reply

Your email address will not be published. Required fields are marked *