Announcement

Collapse
No announcement yet.

SSH/Bash command to restart httpd?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SSH/Bash command to restart httpd?

    Well, it seems that my server went down, but it still responds to ping. I can't remember the command to restart the server via my ssh (bash) shell on top of my head though, so I could use some help with it as I can't find it.

  • #2
    tried restarting apache with

    /etc/rc.d/init.d/httpd stop
    /etc/rc.d/init.d/httpd start
    :: Always Back Up Forum Database + Attachments BEFORE upgrading !
    :: Nginx SPDY SSL - World Flags Demo [video results]
    :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

    Comment


    • #3

      /etc/rc.d/init.d/httpd: line 3: ulimit: open files: cannot modify limit: Operation not permitted

      /etc/rc.d/init.d/httpd: line 4: ulimit: open files: cannot modify limit: Operation not permitted

      /etc/rc.d/init.d/httpd: line 5: ulimit: open files: cannot modify limit: Operation not permitted

      /etc/rc.d/init.d/httpd stop: httpd (pid 9109?) not running

      I guess that didn't work. :/

      Comment


      • #4
        contact your host..
        :: Always Back Up Forum Database + Attachments BEFORE upgrading !
        :: Nginx SPDY SSL - World Flags Demo [video results]
        :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

        Comment


        • #5
          Your server has RedHats openfiles limit and apache needs to be edited with a new ulimit.

          Increase max open files from 8192 to 16384 in /etc/sysctl.conf.

          1.Run sysctl -w fs.file-max=16384

          2.Edit /etc/sysctl.conf. Add a new line with: fs.file-max=4096

          3.Edit /usr/sbin/apachectl. Add a new line with: ulimit -n 4096

          4.Edit /etc/rc.d/init.d/httpd. Under the start subroutine add a new line with: ulimit -n 4096

          5.Restart apache: /etc/rc.d/init.d/httpd restart.

          There are many things that can go wrong with such a modification. If apache still errors out upon restart, I'd suggest recompiling: Before recompilation change in __FD_SETSIZE value in /usr/include/bits/types.h to 16384:

          #define __FD_SETSIZE 16384

          wget Your_favourite_mirror/apache-1.3.28-x.x.x.src.rpm

          rpm --rebuild apache-1.3.28-x.x.x.src.rpm

          rpm -Uvh --force /usr/src/redhat/RPMS/i386/apache*

          On Plesk we have to do:
          cp /usr/sbin/psa-suexec /usr/sbin/suexec

          service httpd restart (and cross fingers).
          Laurence Flynn In our EIGTH year of great hosting!
          HostNexus - #1 Web Hosting Provider
          Plesk 8 LINUX Hosting Solutions brought to you by HostNexus - the Multi-Domain Specialists!

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X