LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-30-2001, 08:54 AM   #1
tuly
LQ Newbie
 
Registered: May 2001
Posts: 1

Rep: Reputation: 0
Angry


I’m running apache on a remote server and I need to be able to bring down apache and bring it back up, my only tool that I have is telnet ,can anybody inform me on how to go about doing this in a safe way
Thank you
 
Old 05-30-2001, 09:01 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Well, what isn't safe these days, but I would recommend using SSH to do that type of task instead of telnet to start with.
 
Old 05-30-2001, 09:25 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
A general startup script u can find here. If ure a user put it in ure home dir and execute from there (if uve got the access rights to starting & stopping apache), if u own the box put the script in /etc/rc.d or equivalent to ure distro and execute from there, or make it a script in ure home dir.

What safety issues?

<Gratuitous warning=on>
Safe would be using ssh instead of telnet.
Sessions tru ssh are encrypted, tru telnet it isnt.
This means if someone would sniff ure telnet session it would be easier to get ure login/pass.

If u dont own the remote box tell the owners to install & use ssh. If thats not an option u/they at least gotta to look for access control restrictions tru TCP wrappers, IPChains rules and PAM access config to name a few -basic- security measures.
<Gratuitous warning=off>
 
Old 05-30-2001, 11:05 AM   #4
#!
Member
 
Registered: May 2001
Distribution: RedHat, 'drake, suse, slack, gentoo, beehive, lfs...
Posts: 43

Rep: Reputation: 15
unSpawn is right - heed his warning. There are a million free and open source connection hijacking and sniffing tools that make it *ez* to take over a session, reset connections, and sniff for passwords. Go to freshmeat.net and look up 'hunt'.

Couple of ways to restart apache:

/etc/init.d/apache stop
/etc/init.d/apache start
---------or------------
ps -ef | grep httpd (or 'pgrep httpd' if your machine has pgrep)
kill -HUP <pid>
---------or------------
if it's a production box, or an active server,
'kill -USR1 <pid>'
...which will allow child processes finish up whatever they're doing before they exit.

A shortcut to finding the pid and restarting the server:
kill -USR1 'cat logs/httpd.pid' <-- note single quotes - you need those to perform command substitution in the shell.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
stoping a module tintilin Slackware 8 02-09-2005 01:57 PM
Starting and stoping squid in Slackware 10 barjeesshees Linux - Networking 0 10-22-2004 05:19 AM
Stoping services at startup kylo8787 Debian 3 04-07-2004 10:09 AM
Stoping xwindows from starting embalmedlenin Debian 7 09-25-2003 11:56 PM
Starting/Stoping Deamons ejtbrown Linux - General 2 03-21-2001 04:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration