Find the answer to your Linux question:
Results 1 to 8 of 8
Hi all. I am still somewhat of a newbie at this, so my apologies if this question doesn't make too much sense. Having run Nmap, I noticed that my port ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Posts
    8

    port 80


    Hi all. I am still somewhat of a newbie at this, so my apologies if this question doesn't make too much sense.

    Having run Nmap, I noticed that my port 80 is open. I understand that this is probably apache / httpd. Having googled a bit on this, The general advice appears to be to stop the http daemon. Trying "httpd stop" doesn't appear to do anything, as port 80 is still open afterwards. Trying "service httpd stop" tells me that "service" command is not found.

    I am quite clearly doing something wrong. Any ideas?

    thanks.

    David.

  2. #2
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Location
    Republic Banana
    Posts
    562
    To stop httpd:
    Code:
    /etc/rc.d/rc.httpd stop
    To disable it at startup:
    Code:
    chmod -x /etc/rc.d/rc.httpd
    The service command is used with SysV style boot. Slackware uses BSD Style init, which is a little different. All your startup scripts are in /etc/rc.d/ . They are well commented, so reading through them will give you some understanding how they work
    I\'m so tired .....
    #200472

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Posts
    8
    /etc/rc.d/rc.httpd stop generates this error:

    -bash: /etc/rc.d/rc.httpd: permission denied

    which is a bit odd, as I am logged in as root.

    also, if I go to /etc/rc.d and then try "rc.httpd stop" I get a command not found error, rather than the same permission denied error. Is there a difference between /etc/rc.d/rc.httpd stop, and actually going to /etc/rc.d and then trying rc.httpd stop?

    "it's a steep learning curve!"

    David.

  4. #4
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    try and stop httpd deamon with
    Code:
    httpd -k stop
    or sometimes
    Code:
    httpd2 -k stop
    dylunio
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

  5. #5
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Location
    Republic Banana
    Posts
    562
    When specifying a program/scripts/whatever executable which is not in your path you'll need to specify the full path or when you're in the directory where this program/whatever is to specify ./programname (a ./ before it) .
    Don't know what causes http to refuse to stop, you could try to kill it with brute force
    Code:
    killall -9 httpd
    Repeat the command if necessary. That should do it I guess
    I\'m so tired .....
    #200472

  6. #6
    Just Joined!
    Join Date
    Jan 2005
    Posts
    8
    -k is aparently an invalid option. (and isn't listed when I do httpd -h) what difference should this option have made?

    David.

  7. #7
    Just Joined!
    Join Date
    Jan 2005
    Posts
    8
    killall -9 httpd That killed it!

    Thanks for the information about the language of linux. I am still battling my way through an online tutorial for the basics of GNU/Linux OS... aparently I haven't got that far yet!

    thanks.

    David.

  8. #8
    Linux Engineer adrenaline's Avatar
    Join Date
    Aug 2004
    Location
    Seattle, Washington
    Posts
    1,058
    Dave I think that if you do
    as root
    cd /etc/rc.d
    chmod -x rc.httpd
    I think it will not start after a reboot.
    I think if you do a killall -9 httpd it just kills it for now but it might restart after a reboot.
    Watch out for that if you are worried but it.

    Mike
    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

Posting Permissions

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